Skip to content

Commit

Permalink
4th Commit : About and Help pages added and some minor tweaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
sweenwolf committed Jan 11, 2020
1 parent c071972 commit 418efc8
Show file tree
Hide file tree
Showing 16 changed files with 588 additions and 375 deletions.
65 changes: 28 additions & 37 deletions HELP.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
# Fire TV Stick 4K
**Installation**
1. Natigate to this GitHub's downloads page (https://github.com/sweenwolf/LauncherHijack/releases/tag/4K.0.3) on your desktop/laptop and download the latest APK
1. Navigate to this GitHub's downloads page (https://github.com/sweenwolf/LauncherHijack/releases/tag/4K.0.3) on your desktop/laptop and download the latest APK
2. Install ADB on your desktop/laptop (Google will help you) and ensure a connection to your Fire TV.
3. Install Launcher Hijack with this command
3. Connect to your Firestick 4K by this command:
`adb connect youripaddress:port`
eg: `adb connect 192.168.43.147:5555`

4. Install Launcher Hijack with this command

`adb install -g <path to downloaded APK>`
eg: `adb install -g C:\Downloads\LH4K.0.3.apk`

if you installed Launcher Hijack without using "-g" then you'll have to enable the accessibility service using these commands:
`adb shell settings put secure enabled_accessibility_services com.baronkiko.launcherhijack/com.baronkiko.launcherhijack.AccServ`
`adb shell settings put secure accessibility_enabled 1`
if you installed Launcher Hijack without using "-g" then you'll have to enable the accessibility service using this command:

4. Find and open Launcher Hijack
5. Press Done to Save the Settings
6. Select your desired Launcher from the list provided
7. Reboot your device (Recommended)
8. Congratulation, if all is working correctly your home button should now open your chosen launcher.
`adb shell pm grant com.baronkiko.launcherhijack android.permission.WRITE_SECURE_SETTINGS`

5. Find and open Launcher Hijack
6. Press Done to Save the Settings
7. Select your desired Launcher from the list provided
8. Reboot your device (Recommended)
9. Congratulation, if all is working correctly your home button should now open your chosen launcher.

# Fire Tablets
**Installation**
**Installation**
1. Natigate to this GitHub's downloads page (https://github.com/BaronKiko/LauncherHijack/releases) on your tablet and download the latest APK
2. Open your newly downloaded file and install like any other Android application
3. Open settings and navigate to "Accessibility -> To detect home button press" and press enable
Expand All @@ -27,10 +31,10 @@ eg: `adb install -g C:\Downloads\LH4K.0.3.apk`
6. Reboot your device
7. Congratulation, if all is working correctly your home button should now open your chosen launcher

**Updates (Specifically 5.6.2.0)**
**Updates (Specifically 5.6.2.0)**
Please disable LauncherHijack in accessibility settings during Fire OS updates. LauncherHijack causes issues during update 5.6.2.0, you wont brick your device or anything with it left enabled but you wont be able to complete update 5.6.2.0 until disabled. There is nothing I can do without degrading the application during regular use. If you somehow end up mid update with LauncherHijack enabled the easiest solution, assuming you can't get to settings, is to uninstall LauncherHijack through ADB (plenty of guides online) and reinstall it after you complete the update.

**Google Now Launcher**
**Google Now Launcher**
The Google Now launcher is the only known launcher that supports widgets out of the box. It can however be a pain to set up so try following these instructions:
1. Ensure Launcher Hijack works with another launcher
2. Install the Google Search App ([Available Here](https://play.google.com/store/apps/details?id=com.google.android.googlequicksearchbox))
Expand All @@ -41,21 +45,21 @@ The Google Now launcher is the only known launcher that supports widgets out of
7. Google now should open when pressing home, if it still doesn't work uninstall all prerequisites and the launcher itself, reboot and try follow the guide again. I had to reinstall once to get it working however I have had reports of people reinstalling 4-5 times before finally getting it working.


**Widgets**
Widget support in prohibited by default for all launchers except the Google Now launcher on Fire OS devices. You can attempt to enable them for a given launcher using the following adb command:
`appwidget grantbind --package <launcher_package_name> --user current`
You can get the package name with Launcher Hijack, in the confirmation dialog when selecting a launcher. The part containted within the brackets is the package name.
**Widgets**
Widget support in prohibited by default for all launchers except the Google Now launcher on Fire OS devices. You can attempt to enable them for a given launcher using the following adb command:
`appwidget grantbind --package <launcher_package_name> --user current`
You can get the package name with Launcher Hijack, in the confirmation dialog when selecting a launcher. The part containted within the brackets is the package name.
Unfortunatly I have had reports of mixed success with this command but it's worth trying if you want widgets for launchers other than the Google Now launcher.


**Disable the Dafault Launcher**
If you are annoyed by the default launcher appearing while your chosen launcher is loading then you can corrupt the default launcher.
**Disable the Dafault Launcher**
If you are annoyed by the default launcher appearing while your chosen launcher is loading then you can corrupt the default launcher.
Fair **WARNING** if you do this without any 3rd party launchers installed you will have a very hard time fixing your device and once the Fire Launcher is broken it can never be fixed for that user account, you will have to make a new user account to ressurect it.
1. Download the corrupted launcher found in the attached files of this [XDA post](https://forum.xda-developers.com/amazon-fire/general/tut-easily-remove-amazons-firelauncher-t3467758). You will need an XDA account to download the file.
2. Install it using the following command `adb install -r -d <path to downloaded file>`
3. Reboot

**Troubleshooting**
**Troubleshooting**
If you are having issues then there are some common issues you can check here:
- Ensure you are using an Amazon device running Fire OS, compatible with all versions as of release (6.3 = latest)
- Ensure home button detection is enabled: "Settings -> Accessibility -> To detect home button press"
Expand All @@ -75,29 +79,16 @@ If you are having issues then there are some common issues you can check here:


# Fire TV's
**Installation**
**Installation**
1. Natigate to this GitHub's downloads page (https://github.com/BaronKiko/LauncherHijack/releases) on your desktop/laptop and download the latest APK
2. Install ADB on your desktop/laptop (Google will help you) and ensure a connection to your Fire TV.
3. Install Launcher Hijack with this command
3. Install Launcher Hijack with this command
`adb install <path to downloaded APK>`
4. Ensure you have some Launchers installed
5. Enable the accessibility service using these commands:
`adb shell settings put secure enabled_accessibility_services com.baronkiko.launcherhijack/com.baronkiko.launcherhijack.AccServ`
5. Enable the accessibility service using these commands:
`adb shell settings put secure enabled_accessibility_services com.baronkiko.launcherhijack/com.baronkiko.launcherhijack.AccServ`
`adb shell settings put secure accessibility_enabled 1`
6. If Launcher Hijack didn't open, find and open it
7. Select your desired Launcher from the list provided
8. Reboot your device
9. Congratulation, if all is working correctly your home button should now open your chosen launcher

**Important, Accessing Settings and the Long Press Menu**
Unfortunatly for FireTV devices a comprimise had to be made. To access the long press menu and with it settings you have to hold menu and home together. You can also get to the default launcher by simply pressing them together.

**Troubleshooting**
If you are having issues then there are some common issues you can check here:
- Ensure you are using an Amazon TV device running Fire OS, compatible with all versions as of release (6.3 = latest)
- Ensure you have enabled the accessibility service with the command: `adb shell settings put secure enabled_accessibility_services com.baronkiko.launcherhijack/com.baronkiko.launcherhijack.AccServ`
- Ensure you can open your launcher directly i.e. Using any launcher, other than your chosen launcher, open you chosen launcher like any other app, this should open your chosen launcher
- Ensure you have selected your chosen launcher in Launcher Hijack
- Reboot your device after following all previous steps
- After clicking home initially wait 10 seconds and press home again. This happens when your chosen launchers process gets killed in the background and may happen from time to time, especially after a reboot. There are plenty of existing apps that already keep a chosen application in memory so try one of those if this is a reoccurring issue for you.
- If all else fails try using one of the following launchers with known compatibility: AppStarter or HALauncher
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
![Logo](AppIcon/TrimmedLogo128.png "Launcher Hijack Logo")
# LauncherHijack V4 (For Firestick 4K)
A small Android application to circumvent the default Amazon Fire launcher. Works for Fire Tablets and Fire TV's.
Huge thanks to ParrotGeek1, BaronKiko, Speeddymon and Urbanman2004.
Huge thanks to ParrotGeek1, BaronKiko, Speeddymon, wilkovatch, and Urbanman2004.

# Important
Please read the instructions for your device in [HELP.md](https://github.com/sweenwolf/LauncherHijack/blob/master/HELP.md)
Please read the instructions for your device before installing in [HELP.md](https://github.com/sweenwolf/LauncherHijack/blob/master/HELP.md)

# Downloads
[Launcher Hijack (4K.0.3)](https://github.com/sweenwolf/LauncherHijack/releases/tag/4K.0.3)
Binary file modified app/release/app-release.apk
Binary file not shown.
22 changes: 16 additions & 6 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
tools:ignore="GoogleAppIndexingWarning"
android:theme="@style/AppTheme">
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name=".About"></activity>
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
Expand All @@ -28,20 +30,25 @@
<service
android:name=".AccServ"
android:label="To detect home button press"
android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE">
android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE"
android:stopWithTask="false">
<meta-data
android:name="android.accessibilityservice"
android:resource="@xml/accessibility_service_config" />

<intent-filter>
<action android:name="android.accessibilityservice.AccessibilityService" />
</intent-filter>
</service>
<service
android:name=".HomeButtonService"
android:enabled="true" />
android:enabled="true"
android:stopWithTask="false" />
<service
android:enabled="true"
android:name=".ScreenOnOffService"
android:enabled="true">
android:exported="false"
android:stopWithTask="false">
<intent-filter>
<action android:name="com.baronkiko.launcherhijack.ScreenOnOffService" />
</intent-filter>
Expand All @@ -50,12 +57,15 @@
<receiver android:name=".BroadcastReceiverOnBootComplete">
<intent-filter>
<category android:name="android.intent.category.DEFAULT" />

<action android:name="android.intent.action.PACKAGE_REMOVED" />
<action android:name="android.intent.action.BOOT_COMPLETED" />

<data android:scheme="package" />
</intent-filter>
</receiver>

<activity android:name=".SettingsActivity"/>
<activity android:name=".SettingsActivity" />
</application>

</manifest>
67 changes: 67 additions & 0 deletions app/src/main/java/com/baronkiko/launcherhijack/About.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
package com.baronkiko.launcherhijack;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;

public class About extends AppCompatActivity {

Button BaronKiko, ParrotGeek1, Speeddymon, Urbanman2004, wilkovatch, wolf;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_about);
getSupportActionBar().hide();

BaronKiko = findViewById(R.id.dev1);
ParrotGeek1 = findViewById(R.id.dev2);
Speeddymon = findViewById(R.id.dev3);
Urbanman2004 = findViewById(R.id.dev4);
wilkovatch = findViewById(R.id.dev5);
wolf = findViewById(R.id.dev6);

BaronKiko.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/BaronKiko/LauncherHijack")));
}
});

ParrotGeek1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/parrotgeek1/LauncherHijack")));
}
});

Speeddymon.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/Speeddymon/LauncherHijack")));
}
});
Urbanman2004.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/urbanman2004")));
}
});
wilkovatch.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/wilkovatch/LauncherHijack")));
}
});
wolf.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/sweenwolf/LauncherHijack")));
}
});

}
}
3 changes: 2 additions & 1 deletion app/src/main/java/com/baronkiko/launcherhijack/AccServ.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@ public void onAccessibilityEvent(AccessibilityEvent event) {
} else {
pName = lastApp;
cName = lastApp;
Log.i("Wolf", pName + cName);
}

if (!settings.ApplicationOpenDetection)
return;

CharSequence packageName = event.getPackageName();
if (packageName.equals("com.amazon.firelauncher"))
if (packageName.equals("com.amazon.firelauncher") || packageName.equals(launcher))
HomePress.Perform(getApplicationContext());

}
Expand Down
Loading

0 comments on commit 418efc8

Please sign in to comment.