Bigcountry907
Well-Known Member
Well this is a pretty exciting moment for me.
I have spent many hours writing some serious shell scripts.
First of all let me tell you a little bit about Auto-Key. What is it?
Auto-key is a program built using shell scripts with the original intention of patching a stock recovery to allow everyone to flash zip files through the stock recovery.
In the case of the One Touch Fierce 2 and many others I am sure there is no TWRP or CWM for the device yet.
And as well no way to flash a backup of the phone when things go wrong leaving us with an unusable device.
It's not bricked but we cant repair system files because we can only flash a update that is signed by the manufacturer.
Well my friends sadly enough for manufacturers those days are over.
Here is how it works.
First the program pulls the /system folder off the phone.
Next it grabs the OTACERTS.ZIP or RELEASEKEY.X509.PEM from the system folder.
This allows us to determine what public exponent was used by the manufacturer.
Then Auto-key will make you your own set of private and public keys. This is a complete set of keys that could be used to compile a custom rom like cyanogenmod or aosp.
Next after auto-key determines the stock offset value it creates the elusive /res/keys file.
The keys file is dumped using you private keyset.
Then we unpack the recovery image and replace the /res/keys file in the ramdisk with our new one.
Once that is done and any other modifications you want to make to the ramdisk are completed the ramdisk gets re-packed.
After all that its just a matter of copying the recovery.img to the sd card and then using DD to write it to the recovery partition.
Sign any zip you want to flash with the new recovery, and yes it will work in fastboot if your device supports fastboot,
Anyway itll flash the file.....You wont get signature failed.
Please note you must sign the zip with the -w option, Signapk.jar alone is not good enough.
Now i need a few more days to finish things up so im not including the flashing or repacking functions today.
This way there is zero risk of anyone doing any kind of damage. If you are a developer you could easily do the repack and dd and sign the zip with -w if you want.
Right now i need to know what all dependencies are going to be required to run my program. And make sure that everything functions well on other systems.
Currently it is designed for a linux system. I am running Ubuntu and I have a full development enviornment installed. I will try to get this going in cygwin for windows so some testing there could be helpful as well.
All the scripts are open and free to modify as you wish. Just share your ideas.
Im going to start testing this tommorow on a fres ubuntu install and then on windows.
The program will tell you what to do when you start running it. Pretty much follow the menus in order.
When you go to a sub menu complete all the options before you return to the previous menu. Then execute the next function on the menu.
Like i said there is currently no function included that could hurt any device. So take it for a spin. I want some feedback and ideas and see what we run into before i spend a week refining it all.
Thanks Have fun and enjoy.
PS you have to unzip the file in your home directory.
So the folder Auto-key will be in your home directory.
type ./autokey.sh to start it from the auto-key folder.
Minimum requirements are
ADB
JAVA
OPENSSL
This runs in the terminal only.
I have spent many hours writing some serious shell scripts.
First of all let me tell you a little bit about Auto-Key. What is it?
Auto-key is a program built using shell scripts with the original intention of patching a stock recovery to allow everyone to flash zip files through the stock recovery.
In the case of the One Touch Fierce 2 and many others I am sure there is no TWRP or CWM for the device yet.
And as well no way to flash a backup of the phone when things go wrong leaving us with an unusable device.
It's not bricked but we cant repair system files because we can only flash a update that is signed by the manufacturer.
Well my friends sadly enough for manufacturers those days are over.
Here is how it works.
First the program pulls the /system folder off the phone.
Next it grabs the OTACERTS.ZIP or RELEASEKEY.X509.PEM from the system folder.
This allows us to determine what public exponent was used by the manufacturer.
Then Auto-key will make you your own set of private and public keys. This is a complete set of keys that could be used to compile a custom rom like cyanogenmod or aosp.
Next after auto-key determines the stock offset value it creates the elusive /res/keys file.
The keys file is dumped using you private keyset.
Then we unpack the recovery image and replace the /res/keys file in the ramdisk with our new one.
Once that is done and any other modifications you want to make to the ramdisk are completed the ramdisk gets re-packed.
After all that its just a matter of copying the recovery.img to the sd card and then using DD to write it to the recovery partition.
Sign any zip you want to flash with the new recovery, and yes it will work in fastboot if your device supports fastboot,
Anyway itll flash the file.....You wont get signature failed.
Please note you must sign the zip with the -w option, Signapk.jar alone is not good enough.
Now i need a few more days to finish things up so im not including the flashing or repacking functions today.
This way there is zero risk of anyone doing any kind of damage. If you are a developer you could easily do the repack and dd and sign the zip with -w if you want.
Right now i need to know what all dependencies are going to be required to run my program. And make sure that everything functions well on other systems.
Currently it is designed for a linux system. I am running Ubuntu and I have a full development enviornment installed. I will try to get this going in cygwin for windows so some testing there could be helpful as well.
All the scripts are open and free to modify as you wish. Just share your ideas.
Im going to start testing this tommorow on a fres ubuntu install and then on windows.
The program will tell you what to do when you start running it. Pretty much follow the menus in order.
When you go to a sub menu complete all the options before you return to the previous menu. Then execute the next function on the menu.
Like i said there is currently no function included that could hurt any device. So take it for a spin. I want some feedback and ideas and see what we run into before i spend a week refining it all.
Thanks Have fun and enjoy.
PS you have to unzip the file in your home directory.
So the folder Auto-key will be in your home directory.
type ./autokey.sh to start it from the auto-key folder.
Minimum requirements are
ADB
JAVA
OPENSSL
This runs in the terminal only.