Hovatek Forum DEVELOPMENT Android [Tweak] Gionee M6 TWRP recovery porting
Try our Online TWRP Builder..its free!
Can't login? Please, reset your password.


[Tweak] Gionee M6 TWRP recovery porting

[Tweak] Gionee M6 TWRP recovery porting

Pages (2): 1 2 Next
Detective_Khalifah
Detective_Khalifah
Detective_Khalifah
Senior Member
237
21-01-2021, 02:29 PM
#1



I recently made a ROM dump and rooted a Gionee M6 device -- https://www.hovatek.com/forum/thread-37769.html. As routine, everyone who actually gets to this stage wants to make some, if not a lot of tweaks; custom recovery & ROM are one of those.
As the device comes with Android 6, and has an encrypted /data partition, the usually simple porting and installing of TWRP recovery doesn't work out as one'd find in earlier versions.
When I booted into the recovery, touch worked. But not so operational when flashed - touch doesn't work. [NOTE: I used fastboot method]
How do I make TWRP recovery that works compatibly with my device?
Attached Files
.zip
M6_recovery_fstab.zip
Size: 1.8 KB / Downloads: 4
X3non
X3non
X3non
Recognized Contributor
22,062
22-01-2021, 12:09 PM
#2
(21-01-2021, 02:29 PM)Detective_Khalifah I recently made a ROM dump and rooted a Gionee M6 device -- https://www.hovatek.com/forum/thread-37769.html. As routine, everyone who actually gets to this stage wants to make some, if not a lot of tweaks; custom recovery & ROM are one of those.
As the device comes with Android 6, and has an encrypted /data partition, the usually simple porting and installing of TWRP recovery doesn't work out as one'd find in earlier versions.
When I booted into the recovery, touch worked. But not so operational when flashed - touch doesn't work. [NOTE: I used fastboot method]
How do I make TWRP recovery that works compatibly with my device?

replace twrp's existing fstab filess with those @ https://www.androidfilehost.com/?fid=172...6145720239
you can try the touch fix by @SachinBorkar @ https://www.hovatek.com/forum/thread-27132.html
This post was last modified: 22-01-2021, 12:10 PM by X3non.
Detective_Khalifah
Detective_Khalifah
Detective_Khalifah
Senior Member
237
22-01-2021, 12:30 PM
#3
(22-01-2021, 12:09 PM)X3non replace twrp's existing fstab filess with those @ https://www.androidfilehost.com/?fid=172...6145720239
...
OK
(22-01-2021, 12:09 PM)X3non ... you can try the touch fix by @SachinBorkar @ https://www.hovatek.com/forum/thread-27132.html
I feared you'd say that. Will give it a go, see if I can win, this time.
This post was last modified: 22-01-2021, 12:31 PM by Detective_Khalifah.
Detective_Khalifah
Detective_Khalifah
Detective_Khalifah
Senior Member
237
22-01-2021, 11:26 PM
#4
(22-01-2021, 12:30 PM)Detective_Khalifah
(22-01-2021, 12:09 PM)X3non ... you can try the touch fix by @SachinBorkar @ https://www.hovatek.com/forum/thread-27132.html
I feared you'd say that. Will give it a go, see if I can win, this time.

I got (HxD top offset.png) while trying step 41 of https://www.hovatek.com/forum/thread-27132.html after I edited the kernel image to replace "1F 08 00 71" with "1F 00 00 71" [https://www.hovatek.com/forum/thread-271...#pid164627]. Tried en.m.wikipedia.org/wiki/List_of_file_signatures & https://www.garykessler.net/library/file_sigs.html & https://www.filesignatures.net/index.php...0&mode=SIG & to see if I could find the right signature, but I got a non-exact match -- cr2 (wikipedia);
[https://www.garykessler.net/library/file_sigs.html]
00 00 00 00 14 00 00 00 ........
TBI Windows Disk Image file
This post was last modified: 23-01-2021, 12:17 AM by Detective_Khalifah. Edit Reason: little lookup result
Attached Files
.png
HxD top offset.png
Size: 396.09 KB / Downloads: 2
X3non
X3non
X3non
Recognized Contributor
22,062
23-01-2021, 01:15 PM
#5



(22-01-2021, 11:26 PM)Detective_Khalifah ...

go through step 1 to 13 again
if yours is using gzip then the first two hex must be 1F 8B and not 10 00
This post was last modified: 23-01-2021, 01:15 PM by X3non.
Detective_Khalifah
Detective_Khalifah
Detective_Khalifah
Senior Member
237
23-01-2021, 01:50 PM
#6
(23-01-2021, 01:15 PM)X3non go through step 1 to 13 again
if yours is using gzip then the first two hex must be 1F 8B and not 10 00
I'm sure recovery.img-zImage has "1F 8B", and extracted file doesn't. But I'll check again - just to be sure.
Detective_Khalifah
Detective_Khalifah
Detective_Khalifah
Senior Member
237
25-01-2021, 02:28 AM
#7
(23-01-2021, 01:50 PM)Detective_Khalifah
(23-01-2021, 01:15 PM)X3non go through step 1 to 13 again
if yours is using gzip then the first two hex must be 1F 8B and not 10 00
I'm sure recovery.img-zImage has "1F 8B", and extracted file doesn't. But I'll check again - just to be sure.

I've checked, and it checks. Kernel inside the gz archive starts with "10 00", while gz archive "recovery.img-zImage" starts with "1F 8B"; I also noticed, that the case is so when I compared to a previous shot I took while working on a Coolpad Mega 3 (https://www.hovatek.com/forum/thread-33808.html), though screenshot isn't a part of the thread, sorry.
For the two extracted kernel images I compared::
Offset (h) 0 of Gionee M6: 10 00 00 14 00 00 00 00 00 00 08 00 00 00 00 00
Offset (h) 0 of Coolpad Mega 3: 10 00 00 14 00 00 00 00 00 00 08 00 00 00 00 00 00

Both extracted kernels are contained in uncompressed gz archive that starts with "1F 8B"
X3non
X3non
X3non
Recognized Contributor
22,062
26-01-2021, 04:12 PM
#8
(25-01-2021, 02:28 AM)Detective_Khalifah ...
For the two extracted kernel images I compared::
Offset (h) 0 of Gionee M6: 10 00 00 14 00 00 00 00 00 00 08 00 00 00 00 00
Offset (h) 0 of Coolpad Mega 3: 10 00 00 14 00 00 00 00 00 00 08 00 00 00 00 00 00

Both extracted kernels are contained in uncompressed gz archive that starts with "1F 8B"

i see the mistake now, you are looking at the extracted kernel (it seems the guide is not clear enough at points 40 & 41)
you are to use the values from the uncompressed gz archive i.e the one starting 1F 8B. it'll give the necessary info you need to recompress the patched kernel to match the compression of the original file
Detective_Khalifah
Detective_Khalifah
Detective_Khalifah
Senior Member
237
26-01-2021, 08:24 PM
#9
(26-01-2021, 04:12 PM)X3non
(25-01-2021, 02:28 AM)Detective_Khalifah ...
For the two extracted kernel images I compared::
Offset (h) 0 of Gionee M6: 10 00 00 14 00 00 00 00 00 00 08 00 00 00 00 00
Offset (h) 0 of Coolpad Mega 3: 10 00 00 14 00 00 00 00 00 00 08 00 00 00 00 00 00

Both extracted kernels are contained in uncompressed gz archive that starts with "1F 8B"

i see the mistake now, you are looking at the extracted kernel (it seems the guide is not clear enough at points 40 & 41)
you are to use the values from the uncompressed gz archive i.e the one starting 1F 8B. it'll give the necessary info you need to recompress the patched kernel to match the compression of the original file

Yeah. In that regard, what'll be my argument to gzip?
Offset (h): 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
00000000 1F 8B 08 00 00 00 00 00 02 03 EC 5B 0B 70 54 55
Detective_Khalifah
Detective_Khalifah
Detective_Khalifah
Senior Member
237
26-01-2021, 08:49 PM
#10



(26-01-2021, 08:24 PM)Detective_Khalifah Yeah. In that regard, what'll be my argument to gzip?
Offset (h): 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
00000000 1F 8B 08 00 00 00 00 00 02 03 EC 5B 0B 70 54 55

I tried " gzip -n -k -9 "path" " and got an archive which has packed size as 7 580 234
"recovery.img-zImage" has packed size as 7 580 236, so in HxD I tried "Edit > Insert bytes... > [Bytecount -> 1, Hex values -> 00]. Had to do it three times, but I got 7 580 234 (lower), 7 580 235 (lower) at 1st & 2nd attempts, and 7 580 237 (higher) at the third.
This post was last modified: 26-01-2021, 08:51 PM by Detective_Khalifah.
Pages (2): 1 2 Next
Users browsing this thread:
 1 Guest(s)
Users browsing this thread:
 1 Guest(s)
YtWhTl
live chat
whatsapp telegram instagram