[MOD] Recent App (Clear all, Setting, Card Stack) for Jelly Bean

Recent App bao gồm:

  1. Xóa tất cả ứng dụng đang chạy
  2. 1 nút để vào cài đặt
  3. Giao diện recent app dạng card stack (xếp chồng)

Bắt đầu mod:

Bước 1:

Decompile SystemUI.apk

Download file source mod, vào copy file source này vào SystemUI theo đúng đường dẫn, riêng folder layout, có 2 file xml, nên so sánh code rồi copy dòng code chưa có sang

Hướng dấn thêm chút:

res\layout\status_bar_rencent_item.xml

Chú ý các điểm sau:

android:rotationX=”-10.0″

android:textColor=”#ff243137″

… thôi nói chung copy giống hết đi :3

– SystemUI.apk/res/values/ids.xml

thêm được này trước </resource>

<item type="id" name="asteroid_recents_task_manager_button">false</item>
<item type="id" name="asteroid_recents_google_button">false</item>
<item type="id" name="asteroid_recents_clear_all_button">false</item>

SystemUI.apk/res/values/strings.xml
thêm được này trước </resource>
<string name="status_bar_recent_launch_task_manager_title">Task manager</string>
<string name="status_bar_recent_launch_google_button">Google</string>
<string name="status_bar_recent_remove_all_button">Remove all</string>

Recompile SystemUI.apk
Bước 2:
Decompile SystemUI.apk mới

đi đến res/values/public.xml và mở nó với notepad++
cứ để nó mở, lát sẽ cần

SystemUI.apk/smali/com/android/systemui/recent/RecentsPanelView.smali

Thêm dòng code đỏ
# instance fields
.field private mAnimateIconOfFirstTask:Z

.field private mFitThumbnailToXY:Z

.field private mGoogleButton:Landroid/widget/ImageButton;

.field private mHighEndGfx:Z
-----------------------------------------------------
.end annotation
.end field

.field private mRecentTasksLoader:Lcom/android/systemui/recent/RecentTasksLoader;

.field private mRecentsClearAllButton:Landroid/widget/ImageButton;

.field private mRecentsContainer:Landroid/view/ViewGroup;

.field private mRecentsNoApps:Landroid/view/View;

.field private mRecentsScrim:Landroid/view/View;

.field private mShowing:Z

.field private mStatusBarTouchProxy:Lcom/android/systemui/recent/StatusBarTouchProxy;

.field private mTaskManagerButton:Landroid/widget/ImageButton;

.field private mThumbnailWidth:I

.field private mWaitingForWindowAnimation:Z
--------------------------------------------
iput v1, p0, Lcom/android/systemui/recent/RecentsPanelView;->mRecentItemLayoutId:I

    .line 267
    invoke-static {p1}, Lcom/android/systemui/recent/RecentTasksLoader;->getInstance(Landroid/content/Context;)Lcom/android/systemui/recent/RecentTasksLoader;

    move-result-object v1

    iput-object v1, p0, Lcom/android/systemui/recent/RecentsPanelView;->mRecentTasksLoader:Lcom/android/systemui/recent/RecentTasksLoader;

    .line 268
    invoke-virtual {v0}, Landroid/content/res/TypedArray;->recycle()V

    .line 269
    return-void
.end method

.method private AsteroidClearAllRecentApps()V
    .locals 8

    .prologue
    const/4 v7, 0x1

    const/4 v6, 0x0

    iget-object v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mContext:Landroid/content/Context;

    const-string v1, "activity"

    invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/app/ActivityManager;

    iget-object v1, p0, Lcom/android/systemui/recent/RecentsPanelView;->mRecentTaskDescriptions:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->isEmpty()Z

    move-result v1

    if-nez v1, :cond_1

    iget-object v1, p0, Lcom/android/systemui/recent/RecentsPanelView;->mRecentTaskDescriptions:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :goto_0
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_0

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/android/systemui/recent/TaskDescription;

    iget v3, v1, Lcom/android/systemui/recent/TaskDescription;->persistentTaskId:I

    invoke-virtual {v0, v3, v7}, Landroid/app/ActivityManager;->removeTask(II)Z

    iget-object v3, p0, Lcom/android/systemui/recent/RecentsPanelView;->mContext:Landroid/content/Context;

    const v4, 0x7f0b00a5

    new-array v5, v7, [Ljava/lang/Object;

    invoke-virtual {v1}, Lcom/android/systemui/recent/TaskDescription;->getLabel()Ljava/lang/CharSequence;

    move-result-object v1

    aput-object v1, v5, v6

    invoke-virtual {v3, v4, v5}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p0, v1}, Lcom/android/systemui/recent/RecentsPanelView;->setContentDescription(Ljava/lang/CharSequence;)V

    const/4 v1, 0x4

    invoke-virtual {p0, v1}, Lcom/android/systemui/recent/RecentsPanelView;->sendAccessibilityEvent(I)V

    const/4 v1, 0x0

    invoke-virtual {p0, v1}, Lcom/android/systemui/recent/RecentsPanelView;->setContentDescription(Ljava/lang/CharSequence;)V

    goto :goto_0

    :cond_0
    iget-object v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mRecentTaskDescriptions:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V

    :cond_1
    invoke-virtual {p0}, Lcom/android/systemui/recent/RecentsPanelView;->dismissAndGoBack()V

    return-void
.end method

.method static synthetic access$177777700(Lcom/android/systemui/recent/RecentsPanelView;)V
    .locals 0
    .parameter "x0"

    .prologue
    .line 75
    invoke-direct {p0}, Lcom/android/systemui/recent/RecentsPanelView;->AsteroidClearAllRecentApps()V

    return-void
.end method

.method static synthetic access$000(Lcom/android/systemui/recent/RecentsPanelView;)Ljava/util/ArrayList;
    .locals 1
    .parameter "x0"

    .prologue
    .line 73
    iget-object v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mRecentTaskDescriptions:Ljava/util/ArrayList;

    return-object v0
.end method

.method static synthetic access$100(Lcom/android/systemui/recent/RecentsPanelView;)I
    .locals 1
    .parameter "x0"

    .prologue
    .line 73
    iget v0, p0, Lcom/android/systemui/recent/RecentsPanelView;->mRecentItemLayoutId:I
-------------------------------------
Đổi 0x7f0b00a5 với giá trị IDS có trong public.xml khi  nãy

<public type="string" name="accessibility_recents_item_dismissed" id="0x7f??????" />
Tiếp theo, tìm hàm này
.method protected onFinishInflate()V
kéo xuống trong hàm đó và add đoạn code đỏ trên return-void
invoke-virtual {v1, v2}, Landroid/view/View;->setBackground(Landroid/graphics/drawable/Drawable;)V

    .line 488
    :cond_0
    :goto_0
    const v1, 0x7f08012e

    invoke-virtual {p0, v1}, Lcom/android/systemui/recent/RecentsPanelView;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/ImageButton;

    iput-object v1, p0, Lcom/android/systemui/recent/RecentsPanelView;->mRecentsClearAllButton:Landroid/widget/ImageButton;

    .line 499
    iget-object v1, p0, Lcom/android/systemui/recent/RecentsPanelView;->mRecentsClearAllButton:Landroid/widget/ImageButton;

    new-instance v2, Lcom/android/systemui/recent/RecentsPanelView$AsteroidClearAll;

    invoke-direct {v2, p0}, Lcom/android/systemui/recent/RecentsPanelView$AsteroidClearAll;-><init>(Lcom/android/systemui/recent/RecentsPanelView;)V

    invoke-virtual {v1, v2}, Landroid/widget/ImageButton;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    const v1, 0x7f08012c

    invoke-virtual {p0, v1}, Lcom/android/systemui/recent/RecentsPanelView;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/ImageButton;

    iput-object v1, p0, Lcom/android/systemui/recent/RecentsPanelView;->mTaskManagerButton:Landroid/widget/ImageButton;

    iget-object v1, p0, Lcom/android/systemui/recent/RecentsPanelView;->mTaskManagerButton:Landroid/widget/ImageButton;

    new-instance v2, Lcom/android/systemui/recent/RecentsPanelView$AsteroidTaskManagerHelper;

    invoke-direct {v2, p0}, Lcom/android/systemui/recent/RecentsPanelView$AsteroidTaskManagerHelper;-><init>(Lcom/android/systemui/recent/RecentsPanelView;)V

    invoke-virtual {v1, v2}, Landroid/widget/ImageButton;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    const v1, 0x7f08012d

    invoke-virtual {p0, v1}, Lcom/android/systemui/recent/RecentsPanelView;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/ImageButton;

    iput-object v1, p0, Lcom/android/systemui/recent/RecentsPanelView;->mGoogleButton:Landroid/widget/ImageButton;

    iget-object v1, p0, Lcom/android/systemui/recent/RecentsPanelView;->mGoogleButton:Landroid/widget/ImageButton;

    new-instance v2, Lcom/android/systemui/recent/RecentsPanelView$AsteroidGoogleHelper;

    invoke-direct {v2, p0}, Lcom/android/systemui/recent/RecentsPanelView$AsteroidGoogleHelper;-><init>(Lcom/android/systemui/recent/RecentsPanelView;)V

    invoke-virtual {v1, v2}, Landroid/widget/ImageButton;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    return-void

    .line 473
    .end local v0           #scrollView:Lcom/android/systemui/recent/RecentsPanelView$RecentsScrollView;
    :cond_1
    new-instance v1, Ljava/lang/IllegalArgumentException;

    const-string v2, "missing Recents[Horizontal]ScrollView"

    invoke-direct {v1, v2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v1

    .line 483
    .restart local v0       #scrollView:Lcom/android/systemui/recent/RecentsPanelView$RecentsScrollView;
----------------------
Change this 0x7f08012e
with the IDS value you got in your public.xml
<public type="id" name="asteroid_recents_clear_all_button" id="0x7f??????" />
--------------
this 0x7f08012c with
<public type="id" name="asteroid_recents_task_manager_button" id="0x7f??????" />
---------------
and this 0x7f08012d with
 <public type="id" name="asteroid_recents_google_button" id="0x7f??????" />
------------
- Xong, Recompile SystemUI.apk và sign nó
- copy Asteroid_taskmanager.apk, Quicksearcbox.apk, SystemUI.apk tới system/app nhớ set quyền 644 cho cả 3 file
- Khởi động lại và thưởng thức
Tested on ROM AOSP 4.2.2

tham khảo thông số này để card stack đẹp hơn
res/values/dimens.xml
<dimen name="status_bar_edge_ignore">5.0dip</dimen>
 <dimen name="status_bar_recents_app_icon_max_width">48.0dip</dimen>
 <dimen name="status_bar_recents_app_icon_max_height">48.0dip</dimen>
 <dimen name="status_bar_recents_thumbnail_width">260.0dip</dimen>
 <dimen name="status_bar_recents_thumbnail_height">170.0dip</dimen>
 <dimen name="status_bar_recents_thumbnail_bg_padding">4.0dip</dimen>
 <dimen name="status_bar_recents_app_label_text_size">14.0dip</dimen>
 <dimen name="status_bar_recents_app_description_text_size">14.0dip</dimen>
 <dimen name="status_bar_recents_text_fading_edge_length">20.0dip</dimen>
 <dimen name="status_bar_recents_scroll_fading_edge_length">10.0dip</dimen>
 <dimen name="status_bar_recents_right_glow_margin">100.0dip</dimen>
 <dimen name="status_bar_recents_thumbnail_left_margin">20.0dip</dimen>
 <dimen name="status_bar_recents_text_description_padding">8.0dip</dimen>
 <dimen name="status_bar_recents_app_label_width">0.0dip</dimen>
 <dimen name="status_bar_recents_app_label_left_margin">3.0dip</dimen>
 <dimen name="status_bar_recents_item_padding">0.0dip</dimen>
 <dimen name="status_bar_recents_app_icon_translate_distance">35.0dip</dimen>
 <dimen name="status_bar_recents_app_icon_left_margin">0.0dip</dimen>
 <dimen name="status_bar_recents_app_icon_top_margin">8.0dip</dimen>

 

♪ ♪ ♪ All rom for P3 — Tổng hợp tất cả rom của Xinh Xinh ♪ ♪ ♪

Các bạn đợi 5s rồi nhấn “Bỏ qua” để đến được link download nhé! Cảm ơn ^^!

✿✿✿ Firmware Stock (up qua flashtool) ✿✿✿
Kitkat T8046
http://www.oni.vn/V20Cd
Kitkat T8058
http://www.oni.vn/VeRuz

Jelly Bean (4.2) T6175
http://www.oni.vn/XpiSL
Jelly Bean (4.2) T6326
http://www.oni.vn/lthMW

✿✿✿ Driver: ✿✿✿
http://www.oni.vn/kk5Ie
—> Lưu ý muốn cài driver thành công trên win 8/8.1/10 thì cần Disable Driver Signature Verification
http://thanhdat2599.blogspot.com/2014/11/thu-thuat-huong-dan-disable-driver.html
✿✿✿ SP Flashtool 3.1: ✿✿✿
http://www.oni.vn/Wf01r

✿✿✿ Hướng dẫn Up Rom qua Flashtool (chi tiết có hình ảnh) ✿✿✿
http://www.oni.vn/hGmMQ

►►► App Install Recovery: (Require: Rooted) ◄◄◄
http://www.oni.vn/WzDWj

✱✱✱ KITKAT – 4.4 ✱✱✱
1. Mobiistar Lai Y
http://www.oni.vn/De0G9

✱✱✱ JELLY BEAN – 4.2 ✱✱✱
1. NOTE 3 SPECIAL (Touchwiz UI)
http://www.oni.vn/KEcQW
2. Redmi Note (Xiaomi UI)
http://www.oni.vn/fz5OK
3. Xperia Z2
http://www.oni.vn/u1PJP
4. Winds Note
http://www.oni.vn/pJh2S
5. LenOPPO (Lenovo + Oppo UI)
http://www.oni.vn/tYv5m
6. S5 VEGA
http://www.oni.vn/UVJF3
7. S5
http://www.oni.vn/34Rsx
8. Android L (Lollipop UI)
http://www.oni.vn/91WRv
9. ColorOS 2.0 Beta
http://www.oni.vn/gErH1
10. Xperia Angel
http://www.oni.vn/JBXC9
11. AOSP v3.1 (Pure UI)
http://www.oni.vn/mmJ0p
12. HTC One
http://www.oni.vn/9EL0U
13. ColorOS 2.0 ver2
http://www.oni.vn/COYbZ
14. Material X1 (Lollipop UI)
http://www.oni.vn/of46V
15. Philips Stable (AOSP UI)
http://www.oni.vn/n0bu1
16. Wiko Bloom
http://www.oni.vn/AmiLf
17. NOTE 3 BIW
http://www.oni.vn/sGOZV
18. Stock 6175 Deodex
http://www.oni.vn/Pn5j9
19. Philips Stable Finally
http://www.oni.vn/VxXGC
20. Xperia Z4
http://www.oni.vn/SDiZk

21. Carpad T65
http://www.oni.vn/H0plg
22. THL 4400
http://www.oni.vn/4heiW
23. X2 Life (Pure UI)
http://www.oni.vn/OF7Ts
24. SKK F5
http://www.oni.vn/NpxYv
25. THL T5S Deodex
http://www.oni.vn/D3ezI
26. Note 3
http://www.oni.vn/Yk90M
27. AOSP V2
http://www.oni.vn/CJOnN
28. HKPHONE RACER
http://www.oni.vn/1ftnE

*** CrossBredder 7.2 *** (Giảm lag tối đa, flash qua recovery)
http://www.oni.vn/IABMQ
— Gỡ cài đặt CrossBredder 7.2
http://www.oni.vn/7IvJY

[GUIDE] How To Port MTK ROMs [For All Chipsets]

I bought Micromax A106 Unite 2 in May and rooted it of of course. Because I never had an experience with MTK before, I didn’t know about MTK porting. I looked into it’s system folders and other. Also I have asked my friends like Rohan Tanejafor help. He helped me much in learning of MTK porting. Finally I was able to port ROMs without any bugs. I have already posted about this in XDA, but I thought posting in blog will make it much easier for people to comment because I have enabled Anonymous commenting so users can comment here without even putting their name. I will try to explain this guide in brief as I can so I don’t think anyone will have doubts left. In case if you have any doubts you can post your comment and I will reply it as soon as possible.
This is for all MT65xx chipsets including:
MT6577
MT6582
MT6589
MT6592

This guide is only for MTK! This will work from same chip to same chip for example MT6582 to MT6582 or MT6577 to MT6577.

Some devices have different partitions to flash and the ROM you might flash can brick your phone. It can even hard brick your phone. So it is recommended that you do a ReadBack, ClockWorkMod Backup and MTK Droid Root & Tools backup. I am not responsible for bricked phones!!

What you need to port a ROM to your device [Your chipset to Your Chipset only]:

  • A ROM to port [in .zip].
  • Your stock ROM [extracted with /system and build.prop].
How To Port ROMs to your Phone:
  • Extract the ROM to port and you will have these main things:
    META-INF
    System
    boot.img.
  • If you have them then you are ready for next step.
  • Open /system folder of stock and rom to port.
  • Open bin folder of stock ROM and copy these files:
    pq
    vold
  • Now replace these files in ROM to Port‘s /System/Bin folder.
  • Open lib folder of Stock ROM and get these files:
    libcamalgo.so
    libcamdrv.so
    libcameracustom.so
    libdpframework.so
    libsensorservice.so
    libsync.so
    libvcodecdrv.so
  • Replace all the files mention above to ROM to Port‘s /system/lib folder.
  • Now open Stock ROM’s /system/etc/ folder and copy these files:
    apns.conf.xml
    vold.fstab
    vold.fstab.nand
  • Now replace these files in ROM to port‘s /system/etc folder.
  • Delete these folders from ROM to Port:
    /System/vendor/
    /System/lib/hw
    /System/lib/modules/
    /System/etc/WiFi
    /System/etc/Firmware
  • Replace these folders from Stock ROM to ROM to Port:
    /System/lib/hw/
    /System/lib/modules//System/etc/WiFi/
    /System/etc/Firmware/
    /System/vendor/
  • The final step! Press back button to go to the main folder where you have the Stock ROM. Copy boot.img [FromStock ROM]and replace it with the ROM to Port‘s.
You are ready! Go ahead and flash the ROM! Problems or you are feeling confused? You can comment out here and tell me your problem or you can also comment if your ported ROM has bugs.

[GUIDE] How To Port PhilZ/CTR/CWM/TWRP Recovery to your Phone

here are now many recoveries for MTK and my favourite recovery till now is PhilZ  recovery. Carliv Touch Recovery is also one of the best recoveries which MTK phones have. TWRP and COT exists too, but for me philZ is the best recovery. There’re 3 ways to port. One is to compile which is the best, but tough for some newbies. Another one is port manually which I will be explaining here and the last one is using automatic CTR porting tool, PhilZ porting tool and Cwm porting tool.
I will be explaining about CTR/twrp/philz/cot porting guide, manually and automatically both.
I prefer you to use the tool because it is less time consuming and works almost with every phone. Use manual porting only if you want learn about Android and other things, or I might say for educational purpose.

Manual Porting Guide [Will work with CTR/CWM/TWRP/Philz etc]

  • Download CTR from this thread: Click here. Download TWRP/COT/philZ from any mtk device with same resolutions.
  • Make sure you have your stock recovery. You can get it with a ReadBack or MTK Droid Root and Tools backup.
  • Now download MTK Boot/Recovery image unpack tool from here.
  • Extract this tool in one folder.
  • Put the images [carliv recovery and stock] in that folder which has extracted tools.
  • Now drag and drop stock recovery to MTK_unpack.bat file.
  • Same with the case of Custom Recovery.
  • Now open the folder of stock recovery folder and open a folder rmdsk in it.
  • Copy these files:
    meta_init.project.rc
    meta_init.rc
    ueventd.rc
    meta_init.modem.rc
    ueventd.goldfish.rc
    fstab
  • Open etc folder and copy recovery.fstab file too.
  • Now replace these files in the Custom recovery with the same directories.
  • Now go back and copy these files from the main folder in which you have your stock recovery’s extracted rmdsk and kernel files:
    kernel
    kernel_header
  • Replace these files in the Custom Recovery too.
  • Now go back to the main folder where you extracted the tool and .IMGs files.
  • Drag and drop the CTR folder to MTK_pack.bat file.
  • You’re done! Now try flashing!
Automatic porting tools
This is what I have found after googling about recoveries!
TWRP Recovery Porting Tool: No Link Found.
PHilz Recovery Porting Tool: Click here.
CWM Recovery Porting Tool: Click here. I will suggest you to use MTK Droid Root and Tools [Latest one].
CTR Recovery Porting Tool: Click here.