Tools and guides for doing software development, data analytics, online privacy, and other things.
This process could permanently break your device. You are solely responsible
for your actions if you choose to use these instructions. SHA256 checksums
(e.g., f423cf47f837d74dbb7b9541701dae281ac548b2e8df5f556dfd71708c83d786
) are
provided to ensure you download the same files I used to make this tutorial. If
your checksums don’t match, they may be corrupt, incompatible, or malicious. Or
they may be just fine. Use good judgment when deciding to trust the source of
the downloads. I put some instruction to restore the stock
ROM which will hopefully help if things go really bad.
7e81d69c303e47a4f0e748a6352d85cd0c8fd90a5a95ae4e076b5e5f960d3c7a
). (Here’s
a guide if
you need help.)f423cf47f837d74dbb7b9541701dae281ac548b2e8df5f556dfd71708c83d786
).System updates could prevent you from rooting or otherwise modifying your device. You can create a firewall to block updates.
Download and install NoRoot
Firewall.
(alternate
link
SHA256 b8c7e4fd106c3be8fa0cf02d4d1ff805b9e858f8328fa0f88ca1b91581323bc5
).
Allow USB debugging on the device if prompted.
adb install "NoRoot Firewall_v3.0.1_apkpure.com.apk"
Adapted from retyre’s XDA guide
Download the root exploit
code (alternate
link
SHA256 8bfc3d5c75964e5fa28c8ffa39a87249ba10ea4180f55f546b2dcc286a585ea8
)
and
Super_SU18+
(alternate
link
SHA256 b572c1a982d1e0baeb571d3bc0df7f6be11b14553c181c9e0bf737cc4a4fbbfd
).
wget -c "http://myphone-download.wondershare.cc/mgroot/20165195.zip" "http://myphone-download.wondershare.cc/mgroot/SuperSU_18+.zip"
Unzip them both to a 20165195
directory.
unzip -u 20165195.zip -d 20165195 && unzip -u SuperSU_18+.zip -d 20165195
Check the 20165195
directory contains all the needed files.
$ ls -1 20165195
Matrix
Superuser.apk
ddexe
debuggerd
fileWork
install-recovery.sh
krdem
mount
patch_boot.sh
pidof
push_root.sh
start_wssud.sh
su
su_arm64
supersu.zip
supolicy
toolbox
wsroot.sh
Push the directory to the tablet.
adb push 20165195 /data/local/tmp
Login to the tablet.
adb shell
Make the files executable.
chmod 755 /data/local/tmp/20165195/*
Run the exploit. You should see a lot of output while it runs.
/data/local/tmp/20165195/Matrix /data/local/tmp/20165195 2
If the script executes successfully, the final lines of output should display
the memory location that was exploited (may be different than 0x7fab64c000
)
and a value of 0
for <Exploit>
and <Done>
. If it fails, check the
Troubleshooting section:
[*] exploited 0x7fab64c000=f97cff8c
end!!!!!!!
<WSRoot><Exploit>0</Exploit></WSRoot>
<WSRoot><Done>0</Done></WSRoot>
You can verify root with su
.
shell@suez:/ $ su
su
root@suez:/ #
Back on your computer, download SuperSU 2.82 SR5
apk
(alternate
link
SHA256 2c7be9795a408d6fc74bc7286658dfe12252824867c3a2b726c1f3c78cee918b
)
and install it to the tablet with adb
.
adb install "eu.chainfire.supersu_2.82-SR5-282_minAPI9(nodpi)_apkmirror.com.apk"
Open up the SuperSU app on the tablet, tap Get Started, then tap Continue and select Normal to update the app. Select Reboot after it is done installing to reboot the tablet.
After the tablet reboots, open SuperSU app again, tap on Settings tab, then tap Default access, then choose Grant.
Log in to your tablet.
adb shell
Switch to superuser and delete directories
/data/data-lib/com.wondershare.DashRoot
and /data/data-lib/wondershare
.
su
rm -r /data/data-lib/com.wondershare.DashRoot /data/data-lib/wondershare
Thumbs up retyre’s XDA guide.
NOTE: Some apps won’t run if your system is rooted. If you need these apps, you can restore stock ROM.
Adapted from tkdfriend’s XDA post
Xposed framework has a lot of nifty plugins for controlling the system at a low level. I use to disable ads and block access to private information.
On your computer, download and install Xposed
Installer
(alternate
link
SHA256 fb72044f0a5ca5c691ea6e6e7c64d081d09c0b4ac6c896f286845ad41a3ae971
).
adb install XposedInstaller_by_dvdandroid_19_10_18.apk
Open Xposed Installer app on the tablet.
Switch to NoRoot Firewall app and under Pending Access tab, allow Xposed Installer and Download Manager.
Switch back to Xposed Installer app. Continue past the warning. Tap on
Official tab, then under Framework, select xposed-v89-sdk22-arm64
, then
tap Install/Update. In the Are you sure? dialog, click OK.
Once it finishes downloading, click OK in the Are you sure? dialog. It should display an Install/Update window that contains the following error:
mv: can't rename '/system/bin/app_process64': No such file or directory
Error 1 occurred
From your desktop, log in to the tablet.
adb shell
Switch to superuser, remount /system
with write access, and delete /system/bin/app_process64_xposed
.
su
mount -o remount,rw /system
rm /system/bin/app_process64_xposed
Log back out of the tablet and reboot your device.
adb reboot
FlashFire is used to flash new firmware. I don’t usually install this, which means this section is not well tested. Use at your own risk ever more than the rest of this document. This process requires root, Xposed, and Xposed module Per App Hacking.
Download and install FlashFire
v0.24
(alternate
link
SHA256 b8edcfa8a684dbd880780eb5d7dcee9b3f09bf0ecaf8b636df4740a48c5f8644
),
but do not open the app yet.
adb install ff_free_v0.24.apk
Log in to the tablet.
adb shell
Switch to superuser, remount /system
as writable, and move FlashFire and
SuperSU apps to /system/app
.
su
mount -o remount,rw /system
cp -r /data/app/eu.chainfire.flash-1 /system/app/ && rm -r /data/app/eu.chainfire.flash-1
cp -r /data/app/eu.chainfire.supersu-1 /system/app/ && rm -r /data/app eu.chainfire.supersu-1
49172c338c501e3455f4b9a9ff40f36493496cd4a92222f77d7fa1901ff47b81
).Run the script 1-Amazon-Fire-5th-gen.bat
on Windows or
3-Amazon-Fire-5th-gen-linux-mac.sh
on Linux/macOS.
1-Amazon-Fire-5th-gen.bat
Install Google Play store
.Here’s a spreadsheet (alternate link) of apps listing which ones are safe to remove or disable.
To get a list of installed packages:
adb shell pm list packages
To uninstall a package:
adb shell pm uninstall PACKAGE_NAME
To disable a package:
adb shell pm disable PACKAGE_NAME
If the tablet won’t boot, you can try to recover by reinstalling the stock ROM.
Download the FireOS 5.6.2.0 stock ROM image
(SHA256 2018c579ca34e859644003c1758fd5d72ff6f0ecd47e5453cb82803ddd6b85da
).
wget -c https://fireos-tablet-src.s3.amazonaws.com/fqt0doGd1liHKioAFObgRm6oGA/update-kindle-40.6.3.6_user_636558520.bin
Hold the power and volume decrease buttons simultaneously until the device boots into recovery mode.
adb reboot recovery
Press the volume decrease button to select the option apply update from adb then press the power button.
Sideload the stock image with adb
.
adb sideload update-kindle-40.6.1.2_user_612496320.bin
If the device still won’t boot, contact Amazon customer support to get a replacement.
Try rebooting the tablet then run the exploit again if you get an error like this:
<WSRoot><Exploit>0x00000332</Exploit></WSRoot>
check done
sched_setaffinity: Function not implemented<WSRoot><Exploit>0x00000382</Exploit></WSRoot>
FAIL : load1 --> /sepolicy
<WSRoot><Exploit>0x00000341</Exploit></WSRoot>
<WSRoot><Exploit>0x00000881</Exploit></WSRoot>
<WSRoot><Done>0x00000172</Done></WSRoot>
Check out the XDA forums.