2 |

3 |
4 | ## fakelauncher 
5 |
6 | *I swear, it is really just a feature phone, not a smart phone!*
7 |
8 | **Disguise your feature-phone-like smart phone (feature phone style but uses Android system) as a real feature phone.**
9 |
10 |
11 |
12 | 我是[中国人](README-ZH.md)
13 |
14 | > [!Caution]
15 | > **DON'T USE THE APP ON YOUR SMARTPHONE BECAUSE EXIT THE APP REQUIRES HARDWARE KEYS**
16 | >
17 | > **I AM NOT RESPONSIBLE FOR ANY DAMAGE TO YOUR PHONE**
18 |
19 | ## Description
20 |
21 | Disguise your feature-phone-like smartphone (feature phone style but uses Android system) as a real feature phone.
22 |
23 | Once you open it, you will be brought to a feature phone UI and not able to open any apps. Status bar will disabled. Touchscreen operation is not allowed, only keys take effect. Thus achieving a disguise effect.
24 |
25 | So, when do you need the App? What kinds of devices are suitable for the App? I'll give an example.
26 |
27 | ## What kind of devices is suitable for the App?
28 |
29 | Here's a feature-phone-like smart phone appears in China:
30 |
31 |
32 | 
33 |
34 | | Item | Value |
35 | |--------------|-----------------------|
36 | | Name | TCL onetouch E1 5G |
37 | | Code | T508N |
38 | | SoC | Unisoc T157 (ums9620) |
39 | | Android ver. | 13 Tiramisu |
40 |
41 |
42 |
43 | As you can see, this phone **looks like a feature phone** but actually has an high version of Android and 64 bit SoC with 5G support. That means you can use it as an common Android phone, **with games and media softwares installed.**
44 |
45 | This feature attracted a number of senior high students in China to choose it and bring it to school so that they can use it as smartphone much safer than real smartphone. Including me.
46 |
47 | But what if teachers notice its **UI**? It is just a common smartphone UI. So if your teachers find out your feature phone is actually a smartphone, **you're done.**
48 |
49 | As a result, `fakelauncher` is developed by me to solve this problem.
50 |
51 | ## How to use
52 |
53 | 1. After installed it, activate it in Xposed. Requires reboot!
54 | 2. Open `FakeL Settings` and grant all permissions
55 | 3. Use a key mapping app (For example, `Xposed Edge Pro`) and bind a key to launch fakelauncher (com.wtbruh.fakelauncher.SplashActivity). After launching it, you will be brought to a feature-phone like UI
56 | 4. If you want to exit, go to main screen, and press DPAD keys: Up, Up, Down, Down, Left, Right, Left, Right. Program will exit after pressing these keys.
57 |
58 | If requiring a video tutorial, jump to [Bilibili](https://www.bilibili.com/video/BV1AweqzjEJj)
59 |
60 | ## How does it work?
61 |
62 | Take a look of a function that natively supported by Android: [Screen Pinning](https://support.google.com/android/answer/9455138)
63 |
64 | That's why the App can disable status bar and prevent you from exiting itself and open any other apps. Here I used Xposed to hook system service. When the app starts, xposed will call method to enable Screen Pinning. Similarly, Screen Pinning will be disabled after exiting app.
65 |
66 | Specially thanks the program: [PinningApp](https://github.com/HChenX/PinningApp), a number of codes related to Screen Pinning were used for reference.
67 |
68 | ## Downloads
69 |
70 | > [!Note]
71 | > CI build version can get the newest experience but may not stable.
72 | >
73 | > Note for those who new to Github: downloading CI builds [requires a Github account.](https://github.com/signup)
74 |
75 | Release version: [](https://github.com/zh-xijun/fakelauncher/releases)
76 |
77 | CI build version: [](https://github.com/zh-xijun/fakelauncher/actions/workflows/android.yml)
78 |
79 | ## TO-DO
80 |
81 | - [ ] Release v0.3
82 | - [x] Support for old Android (Tested on Android 5.1, Android 13)
83 | - [x] Disable touch at system level (Software level at present, preventing touchable elements from appearing) (thx maidang2233)
84 | - [ ] Add Media Player (MP3) UI style
85 | - [x] ~~Add stroke text~~ Resizable text stroke width
86 | - [x] Resizable elements of main UI
87 | - [ ] Complete Contacts page
88 | - [ ] Add Message page
89 | - [ ] ~~Video progress bar~~, select file in fullscreen photo view, ~~option menu~~ (Gallery)
90 | - [ ] Open fake ui on boot
91 | - [ ] Block power menu and shutdown directly while long pressing power key
92 | - [x] Dpad action can be customized (Exit method)
93 | - [ ] Dialer can make a phone call
94 | - [ ] Hide navigation bar
95 |
96 | ## Thanks
97 | - [Android](https://source.android.com/)
98 | - [Xposed](https://github.com/LSPosed/LSPosed)
99 | - [PinningApp](https://github.com/HChenX/PinningApp)
100 | - [Shizuku API](https://github.com/RikkaApps/Shizuku-API)
101 | - [Dhizuku API](https://github.com/iamr0s/Dhizuku-API)
102 |
--------------------------------------------------------------------------------
/app/src/main/java/com/wtbruh/fakelauncher/ui/fragment/phone/DialerFragment.java:
--------------------------------------------------------------------------------
1 | package com.wtbruh.fakelauncher.ui.fragment.phone;
2 |
3 | import android.content.SharedPreferences;
4 | import android.os.Bundle;
5 |
6 | import android.util.Log;
7 | import android.view.KeyEvent;
8 | import android.view.LayoutInflater;
9 | import android.view.View;
10 | import android.view.ViewGroup;
11 | import android.widget.TextView;
12 |
13 | import androidx.preference.PreferenceManager;
14 |
15 | import com.wtbruh.fakelauncher.R;
16 | import com.wtbruh.fakelauncher.ui.fragment.settings.SubSettingsFragment;
17 | import com.wtbruh.fakelauncher.ui.fragment.BaseFragment;
18 | import com.wtbruh.fakelauncher.utils.PrivilegeProvider;
19 | import com.wtbruh.fakelauncher.utils.UIHelper;
20 |
21 | public class DialerFragment extends BaseFragment {
22 | private final static String TAG = DialerFragment.class.getSimpleName();
23 | private static final String ARG_INPUT = "input";
24 | private SharedPreferences mPrefs;
25 | private TextView mEditText;
26 |
27 | public DialerFragment() {
28 | // Required empty public constructor
29 | }
30 | public static DialerFragment newInstance() {
31 | return new DialerFragment();
32 | }
33 |
34 | /**
35 | * 启动该fragment时传入参数