• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root Roms For The Fierce 2

I am in the process of testing things now.
I did have a problem with mis matched keys.

Solved that issue.

Now i am testing the rom with someone.

Will post updates soon as done testing

For some reason its only letting me reply to your post but not the tread? Anyway I said in previous post I would be happy to test for you seeing as I have 2 fierce 7040N that are not my daily phones. I am a Noob but fallow direction pretty well...lol.
Anyway very grateful for all the work your doing and willing to help anyway I can

Thanks
 
Upvote 0
@ jason39828
No you are not doing anything wrong.

Originally I think I signed the recovery images with a different set of keys.
And also discovered since we are using sideload the amount of space on the phone matters. With the /data and /system and /custpack folders all in one package there isnt enough space on the phone to store the complete file during the sideload.

A Part of the file signature is stored in the footer of the zip file so without getting a complete file downloaded to the phone the signature gets cut out and causes the error.

I resolved this issue by making a matching set of keys and splitting up the rom in to 2 flashes.

Currently i am testing a 7040T with someone across the world. His phone was messed up a little bit to begin with. But after flashing his re-packed backup to his phone. It's not booting all the way.

We do not get any errors during the update so the update script is pretty close to right,

There are two problems I believe.

#1 I am missing some of the file permissions that need to be set and possibly a couple of symlinks.

Since there is no complete factory rom for this phone yet from alcatel I have no precise way of determining all of these. If the symlink was not copied during the backup I have no way to find it. And the permissions I have set are from a Factory OTA for the 7040N and what I can find in other alcatel roms.

The difficult thing about alcatel is there is some app information in the /data folder and i need to add permissions for /data. The other difficult thing is that the /custpack folder holds alot of system apps. And I actually need to create a symlink for /system to know /custpack is /system/app.

If anyone knows a good way to get all the symlinks off of a running phone and can do that for me it will help.
Same thing for permissions. Im pretty sure once the files are made into the backup the permissions get lost.
If anyone can get all the permissions off there running phone for /system /custpack /data that will probably help.

The updater script is the new kind that uses selinux and metadata instead of set perm.

TO BE CONTINUED.
 
Upvote 0
@ jason39828
No you are not doing anything wrong.

Originally I think I signed the recovery images with a different set of keys.
And also discovered since we are using sideload the amount of space on the phone matters. With the /data and /system and /custpack folders all in one package there isnt enough space on the phone to store the complete file during the sideload.

A Part of the file signature is stored in the footer of the zip file so without getting a complete file downloaded to the phone the signature gets cut out and causes the error.

I resolved this issue by making a matching set of keys and splitting up the rom in to 2 flashes.

Currently i am testing a 7040T with someone across the world. His phone was messed up a little bit to begin with. But after flashing his re-packed backup to his phone. It's not booting all the way.

We do not get any errors during the update so the update script is pretty close to right,

There are two problems I believe.

#1 I am missing some of the file permissions that need to be set and possibly a couple of symlinks.

Since there is no complete factory rom for this phone yet from alcatel I have no precise way of determining all of these. If the symlink was not copied during the backup I have no way to find it. And the permissions I have set are from a Factory OTA for the 7040N and what I can find in other alcatel roms.

The difficult thing about alcatel is there is some app information in the /data folder and i need to add permissions for /data. The other difficult thing is that the /custpack folder holds alot of system apps. And I actually need to create a symlink for /system to know /custpack is /system/app.

If anyone knows a good way to get all the symlinks off of a running phone and can do that for me it will help.
Same thing for permissions. Im pretty sure once the files are made into the backup the permissions get lost.
If anyone can get all the permissions off there running phone for /system /custpack /data that will probably help.

The updater script is the new kind that uses selinux and metadata instead of set perm.

TO BE CONTINUED.
@jason39828

Currently both 7040T and 7040N will not allow you to flash. I am still trying to get the rom up and running correctly.

Anyway give me a few min and i will post link for the good recovery and a test update.zip to show it will run.
The test update zip will not make any changes to your phone. Only display a message.

I will be more than happy to test them in anyway i can for you. Also you mentioned in earlier post that you had some OTA updates for the 7040N?
 
Upvote 0
Yes I have 2 OTA Updates but if you changed files like apps in custpack or system it will reject the ota. Theese OTA expect the phone to be untouched and check the md5 sum of each file it will modify. So if any ot them are not there or have changed it will error out.

I dont understand why they have this phone so locked down.

If you open ADB and
type
adb pull /custpack/build.prop

or navigate to /custpack with root-browser and copy the file build.prop to your sd card and send it to me. I can see what the current update your phone is running.
 
Upvote 0
  • Like
Reactions: scary alien
Upvote 0
Ok thats good. reboot your phone its still fine. Flashify automatically boots you into recovery after it flashes it.

Here is the test zip for you to sideload. It only displays a message it will not change anything.

https://drive.google.com/file/d/0B8jitdIyh2NtYmZ5bGJsbExuUUU/view?usp=sharing
copy the file to C;\ANDROID\SDK\PLATFORM-TOOLS folder on your computer.
Unless you installed adb somewhere else. You should see adb.exe in the same folder.


To sideload open up adb.

attach phone to computer
reboot the phone to recovery.
in recovery select apply update from ADB.

on the computer in ADB shell
type
adb devices
you should see sideload
if you do
type

adb sideload message.zip

if you dont see any device when you type adb devices
You need to install this driver
https://drive.google.com/file/d/0B8jitdIyh2NtVlN2NEdnRWJTbTg/view?usp=sharing

Just unzip universal driver
double click and install it.
let me know if all is well with the

adb devices

and if you get the messages from the message.zip

What version of windows are you working on?
 
Upvote 0
Ok thats good. reboot your phone its still fine. Flashify automatically boots you into recovery after it flashes it.

Here is the test zip for you to sideload. It only displays a message it will not change anything.

https://drive.google.com/file/d/0B8jitdIyh2NtYmZ5bGJsbExuUUU/view?usp=sharing
copy the file to C;\ANDROID\SDK\PLATFORM-TOOLS folder on your computer.
Unless you installed adb somewhere else. You should see adb.exe in the same folder.


To sideload open up adb.

attach phone to computer
reboot the phone to recovery.
in recovery select apply update from ADB.

on the computer in ADB shell
type
adb devices
you should see sideload
if you do
type

adb sideload message.zip

if you dont see any device when you type adb devices
You need to install this driver
https://drive.google.com/file/d/0B8jitdIyh2NtVlN2NEdnRWJTbTg/view?usp=sharing

Just unzip universal driver
double click and install it.
let me know if all is well with the

adb devices

and if you get the messages from the message.zip

What version of windows are you working on?

test worked great
 
  • Like
Reactions: scary alien
Upvote 0
@jason39828

If you have time when you are done with this test It would be good for us to make a backup of your phone.

We will use the onandroid script and also some adb commands to get the rest.

Im thinking it would be a good idea for me to have a copy of the boot partitions and the bootloader itself. Do you have busybox installed?

This is how the update script in the OTA is checking files.

assert(apply_patch_check("/custpack/JRD_custres/app/BatteryWarning-res.apk", "b1772f1910ee9a7c7fdbf971f46ed2fc0163deb6", "125516bfdda63527d6c8f425ea20f2587a148cb9"));

The OTA seems to allways patch theese partitions too.
So i would like to pull theese images from your phone.

set_progress(0.982045);
ui_print("Patching boot image...");
apply_patch("EMMC:/dev/block/platform/msm_sdcc.1/by-name/boot:7925760:a670bb5e30de381c5bdd8404ad0b4b5284ce0c9e:7936000:6d3aa0aa13ef07e6aad86d76ffb9a6816fbeaf03",
"-", 6d3aa0aa13ef07e6aad86d76ffb9a6816fbeaf03, 7936000,
a670bb5e30de381c5bdd8404ad0b4b5284ce0c9e, package_extract_file("patch/boot.img.p")) || abort("apply_patch failed");
set_progress(0.994792);
ui_print("Writing study img...");
format("emmc", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/fsg", "0", "/study");
package_extract_file("study.img", "/dev/block/platform/msm_sdcc.1/by-name/fsg");
set_progress(0.997319);
set_fota_flag("true");
ui_print("Patching emmcboot image...");
apply_patch("EMMC:/dev/block/platform/msm_sdcc.1/by-name/aboot:212088:ca42629e5592077ab4f77381cb071d6970b82753:213028:47bfa2566b62f96c763c890691ce7a9195f3c4d3",
"-", 47bfa2566b62f96c763c890691ce7a9195f3c4d3, 213028,
ca42629e5592077ab4f77381cb071d6970b82753, package_extract_file("patch/emmc_appsboot.mbn.p")) || abort("apply_patch failed");
set_progress(0.997661);
ui_print("Patching rpm image...");
apply_patch("EMMC:/dev/block/platform/msm_sdcc.1/by-name/rpm:151040:30d2b01400aead2b30cfc0ef9f3353c9576816fa:151040:a66ab79f2090520f8f8681715ce8685ffec6abad",
"-", a66ab79f2090520f8f8681715ce8685ffec6abad, 151040,
30d2b01400aead2b30cfc0ef9f3353c9576816fa, package_extract_file("patch/rpm.img.p")) || abort("apply_patch failed");
set_progress(0.997904);
ui_print("Patching tz image...");
apply_patch("EMMC:/dev/block/platform/msm_sdcc.1/by-name/tz:343092:3f931289b6498cb4bf0bfd6bc558613293e44292:343092:09076cbe30882ce066918527034c7edbd261193c",
"-", 09076cbe30882ce066918527034c7edbd261193c, 343092,
3f931289b6498cb4bf0bfd6bc558613293e44292, package_extract_file("patch/tz.img.p")) || abort("apply_patch failed");
set_progress(0.998455);
ui_print("Patching sbl1 image...");
apply_patch("EMMC:/dev/block/platform/msm_sdcc.1/by-name/sbl1:232212:cd4347f762d9f9a11f612e02fa5955a5fb5fb948:232212:b8b2735f074b0d5ff510be2a9a73af8c7730fbdc",
"-", b8b2735f074b0d5ff510be2a9a73af8c7730fbdc, 232212,
cd4347f762d9f9a11f612e02fa5955a5fb5fb948, package_extract_file("patch/sbl1.img.p")) || abort("apply_patch failed");
set_progress(0.998828);
ui_print("Patching sdi image...");
apply_patch("EMMC:/dev/block/platform/msm_sdcc.1/by-name/sdi:22724:9db95c9ad2c41d9247b467241467d0de0c25a002:22724:8c8edde1253dbc5190850d734242c674444f7a02",
"-", 8c8edde1253dbc5190850d734242c674444f7a02, 22724,
9db95c9ad2c41d9247b467241467d0de0c25a002, package_extract_file("patch/sdi.img.p")) || abort("apply_patch failed");
set_progress(0.998864);
set_fota_flag("false");
ui_print("Patching abootbk image...");
apply_patch("EMMC:/dev/block/platform/msm_sdcc.1/by-name/abootbk:212088:ca42629e5592077ab4f77381cb071d6970b82753:213028:47bfa2566b62f96c763c890691ce7a9195f3c4d3",
"-", 47bfa2566b62f96c763c890691ce7a9195f3c4d3, 213028,
ca42629e5592077ab4f77381cb071d6970b82753, package_extract_file("patch/emmc_appsboot.mbn.p")) || abort("apply_patch failed");
set_progress(0.999206);
ui_print("Patching rpmbk image...");
apply_patch("EMMC:/dev/block/platform/msm_sdcc.1/by-name/rpmbk:151040:30d2b01400aead2b30cfc0ef9f3353c9576816fa:151040:a66ab79f2090520f8f8681715ce8685ffec6abad",
"-", a66ab79f2090520f8f8681715ce8685ffec6abad, 151040,
30d2b01400aead2b30cfc0ef9f3353c9576816fa, package_extract_file("patch/rpm.img.p")) || abort("apply_patch failed");
set_progress(0.999449);
ui_print("Patching tz image...");
apply_patch("EMMC:/dev/block/platform/msm_sdcc.1/by-name/tzbk:343092:3f931289b6498cb4bf0bfd6bc558613293e44292:343092:09076cbe30882ce066918527034c7edbd261193c",
"-", 09076cbe30882ce066918527034c7edbd261193c, 343092,
3f931289b6498cb4bf0bfd6bc558613293e44292, package_extract_file("patch/tz.img.p")) || abort("apply_patch failed");
set_progress(1.000000);
delete("/system/recovery-from-boot.p",
"/system/etc/install-recovery.sh");
show_progress(0.100000, 10);
delete("custpack/app/removeable/withoutlibs/BlockIt_2.1.5.6_aligned.apk");
ui_print("Unpacking new files...");
package_extract_dir("system", "/system");
package_extract_dir("custpack", "/custpack");
package_extract_dir("firmware", "/firmware");
ui_print("Unpacking new recovery...");
package_extract_dir("recovery", "/system");
 
  • Like
Reactions: scary alien
Upvote 0
@jason39828

So you confirm !!

The recovery boots and functions after flashing to the phone.

And you successfully used sideload to run the message.zip.

Can you take a pic of your phone screen and post it up here showing my messages.

I know it works but I think others don't.
If you post a pic they will see.

Then maybe one of the more experienced devs will help me out with my missing symlinks and permissions.

Since they will know this is real and how close i am to a working rom.
 
  • Like
Reactions: scary alien
Upvote 0
@jason39828

So you confirm !!

The recovery boots and functions after flashing to the phone.

And you successfully used sideload to run the message.zip.

Can you take a pic of your phone screen and post it up here showing my messages.

I know it works but I think others don't.
If you post a pic they will see.

Then maybe one of the more experienced devs will help me out with my missing symlinks and permissions.

Since they will know this is real and how close i am to a working rom.

YES i confirm it worked perfectly...give me a minute for pic
 
Upvote 0
i know not best pic but hard at the moment...got to step out for a few minutes
 

Attachments

  • WIN_20160125_19_42_05_Pro.jpg
    WIN_20160125_19_42_05_Pro.jpg
    209.3 KB · Views: 305
Upvote 0
Great
Thanks again for testing this out.
Now if I can get the rest of my update script figured out for the rom we will be all set.

Tomorrow I will try to see if i can make an sideload to backup all the partition images so you can do a sideload and get the backup on your sd card to send me.

But in the mean time if you have an hour we can do it with adb.

Thanks again
 
  • Like
Reactions: scary alien
Upvote 0
Great
Thanks again for testing this out.
Now if I can get the rest of my update script figured out for the rom we will be all set.

Tomorrow I will try to see if i can make an sideload to backup all the partition images so you can do a sideload and get the backup on your sd card to send me.

But in the mean time if you have an hour we can do it with adb.

Thanks again
unfortunately i dont have a big enough SD and cant get one till payday. i have a little 2g in it right now.
 
Upvote 0
about 1 gig will do just fine. Less if you need it to be less.
We can copy a partition at a time and pull it to the computer to conserve space.

What im thinking is if I use dd to make raw partition images that i can flash the images using
WRITE RAW IMAGE
instead of
PACKAGE EXTRACT

By creating Raw images of the partitions and flashing back Raw images Then I think there is a chance maybe I wont loose the Permissions Settings or any Symlinks.

I know when you unzip a android backup you loose files and permissions. Even though I am doing this in Linux it still happens I believe.

The Raw Images could solve the whole problem.

Thoughts Anyone??
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones