-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 38aa30c
Showing
14 changed files
with
132 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Sony RIC Defeat - Flashable zip | ||
=================== | ||
|
||
A flashable zip to defeat Sony RIC protection, based on the [loadable kernel module by MohammadAG](https://github.com/MohammadAG/wp_mod) | ||
Module crc patching code can be found [here](https://github.com/dosomder/modulecrcpatch) |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
ui_print(" ");ui_print(" "); | ||
ui_print("==========================================="); | ||
ui_print("| |"); | ||
ui_print("| *** Sony RIC Defeat *** |"); | ||
ui_print("| |"); | ||
ui_print("| Created by zxz0O0 |"); | ||
ui_print("| Kernel module by MohammadAG |"); | ||
ui_print("| |"); | ||
ui_print("==========================================="); | ||
|
||
ui_print(""); | ||
show_progress(1.000000, 0); | ||
|
||
ui_print("Extracting files..."); | ||
package_extract_file("utils/modulecrcpatch", "/tmp/modulecrcpatch"); | ||
package_extract_file("utils/busybox", "/tmp/busybox"); | ||
package_extract_file("utils/installmount.sh", "/tmp/installmount.sh"); | ||
package_extract_file("wp_mod.ko", "/tmp/wp_mod.ko"); | ||
set_perm(0, 0, 0755, "/tmp/modulecrcpatch"); | ||
set_perm(0, 0, 0755, "/tmp/busybox"); | ||
set_perm(0, 0, 0755, "/tmp/installmount.sh"); | ||
set_perm(0, 0, 0644, "/tmp/wp_mod.ko"); | ||
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/System", "/System"); | ||
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system"); | ||
set_progress(0.300000); | ||
|
||
ui_print("Patching kernel module"); | ||
if | ||
run_program("/tmp/busybox", "ls", "/system/lib/modules/scsi_wait_scan.ko") != "0" | ||
then | ||
if | ||
run_program("/tmp/busybox", "ls", "/System/lib/modules/scsi_wait_scan.ko") != "0" | ||
then | ||
abort("Error finding scsi module"); | ||
else | ||
set_progress(0.400000); | ||
if | ||
run_program("/tmp/modulecrcpatch", "/System/lib/modules/scsi_wait_scan.ko", "/tmp/wp_mod.ko") != "0" | ||
then | ||
abort("Error patching kernel module"); | ||
else | ||
set_progress(0.600000); | ||
run_program("/tmp/busybox", "cp", "/tmp/wp_mod.ko", "/System/lib/modules/wp_mod.ko"); | ||
set_progress(0.700000); | ||
ui_print("Installing mount hook"); | ||
assert(run_program("/tmp/installmount.sh", "System") == "0"); | ||
set_progress(0.800000); | ||
endif; | ||
endif; | ||
else | ||
set_progress(0.400000); | ||
if | ||
#todo: dynamically check for kernel modules to read crc | ||
run_program("/tmp/modulecrcpatch", "/system/lib/modules/scsi_wait_scan.ko", "/tmp/wp_mod.ko") != "0" | ||
then | ||
abort("Error patching kernel module"); | ||
else | ||
set_progress(0.600000); | ||
run_program("/tmp/busybox", "cp", "/tmp/wp_mod.ko", "/system/lib/modules/wp_mod.ko"); | ||
set_progress(0.700000); | ||
ui_print("Installing mount hook"); | ||
assert(run_program("/tmp/installmount.sh", "system") == "0"); | ||
set_progress(0.800000); | ||
endif; | ||
endif; | ||
|
||
set_progress(0.900000); | ||
ui_print("Cleaning up..."); | ||
unmount("/system"); | ||
unmount("/System"); | ||
|
||
set_progress(1.000000); | ||
ui_print("Finished!"); |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/sbin/sh | ||
|
||
system=$1 | ||
|
||
echo "#!/$system/bin/sh" > /tmp/mount.sh | ||
echo 'mod_loaded=`lsmod | grep wp_mod`' >> /tmp/mount.sh | ||
echo 'if [ "$mod_loaded" = "" ]; then' >> /tmp/mount.sh | ||
echo " insmod /$system/lib/modules/wp_mod.ko" >> /tmp/mount.sh | ||
echo "fi" >> /tmp/mount.sh | ||
echo "/$system/bin/stock/mount \"\$@\"" >> /tmp/mount.sh | ||
|
||
if [ ! -f /$system/bin/stock/mount ] | ||
then | ||
echo "Stock mount does not exist. Creating dir and link" | ||
mkdir /$system/bin/stock | ||
chmod 755 /$system/bin/stock | ||
ln -s /$system/bin/toolbox /$system/bin/stock/mount | ||
fi | ||
rm /$system/bin/mount | ||
cp /tmp/mount.sh /$system/bin/mount | ||
chmod 755 /$system/bin/mount | ||
|
||
echo "Installing of mount.sh finished" |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
@echo off | ||
7z.exe a ..\RICDefeat_.zip ..\RICDefeat\* | ||
java.exe -Xmx1024m -jar signapk.jar -w testkey.x509.pem testkey.pk8 ..\RICDefeat_.zip ..\RICDefeat.zip | ||
del ..\RICDefeat_.zip |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIEqDCCA5CgAwIBAgIJAJNurL4H8gHfMA0GCSqGSIb3DQEBBQUAMIGUMQswCQYD | ||
VQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN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