Custom recovery development for the k81 - Android General

Thanks to PizzaG there's now a working build of PitchBlack recovery. Flash it with deadman96385's k81tool
k81-pitch-black-recovery.img
More to come in the near future

Instructions
Download the k81tool and the recovery image
Open a command prompt and change the working directory to the location you saved the tool and recovery image to by issuing this command:
Code:
cd "C:\user directory"
Set up ADB tools in a second command prompt
Enable ADB in the tablets developer options, then issue this command through ADB to boot the device into EDL:
Code:
adb reboot edl
The screen will be black and the LED will be red
Go back to the command prompt that you set to the k81tool directory and issue this command
Code:
k81tool write recovery "C:\user directory"\k81-pitch-black-recovery.img
The output should look like this:
Code:
Sending programmer...Connecting to programmer...log: Binary build date: Mar 26 2016 @ 00:32:43
log: [email protected] [email protected]
log: [email protected] [email protected]
log: Finished sector address 0
log: Finished sector address 0
Writing recovery ...
log: start 491520, num 55508
Write 28420096 bytes, 55508 sectors
Failed: Unknown error
Reset in 5 seconds ...
Reset in 4 seconds ...
Reset in 3 seconds ...
Reset in 2 seconds ...
Reset in 1 seconds ...
Failed: Unknown error
Ignore the "Failed: Unknown error" messages and reboot the device into recovery either by key combination or ADB
Swipe to allow modifications and you should have a working recovery

Download link for what's available. PB and OF built from 7.1, TWRP built from 6.0
https://androidfilehost.com/?w=files&flid=319540

Related

Downgrade htc rhyme

Hi. sorry for bad english
this guide for downgrade htc rhyme on stock rom 1.29.401.3 (RST)
because when you unlocked bootloader, rom increases on 2.0.0.3.....
Recover the full Stock except Relock bootloader.
all the responsibility on you. All personal data will certainly be affected
This procedure will consist of several steps
1 Changing the version number, in order to downgrade firmware was possible.
2 Downgrade device
condition: device must be unlock and have root
Step 1: Changing the version number
condition: bootloader unlock, device is loaded and connected, debugging on.
1. Put the files downloaded from here (aks me) in the tools folder in the root of drive C:
2.Open a command prompt and enter the following code (after each line enter):
cd c:\tools
adb push misc_version /data/local/tmp/misc_version
adb shell chmod 777 /data/local/tmp/misc_version
adb shell
/data/local/tmp/misc_version -s 1.00.000.0
After the introduction of these commands, you should have the following:
--set_version set. VERSION will be changed to: 1.00.000.0
Patching and backing up partition 17...
Note: If you will have an error «Error opening backup file.», Make sure that your memory card is inserted into the phone, not in the computer (make sure the phone is not switched to USB Storage).
3. Enter the code:
# sync
Double-check back to write code and make sure that all the work you have done correctly with the code:
dd if=/dev/block/mmcblk0p17 bs=1 skip=160 count=10
After entering the code should appear:
1.00.000.010+0 records in
10+0 records out
10 bytes transferred in 0.001 secs (10000 bytes/sec)
STEP 2:
1. At the command prompt, type the following command to restart the boot menu (bootloader):
adb reboot bootloader
1.1 Open another command window (not the previous close) and lock bootloader using the instructions from htcdev
1.2 After the locking bootloader device will be reboot ..... hold the lower volume button to enter the bootloader and select the power button fastboot
and back to the first command line window
2. Make sure that your device is recognized by entering the following command:
fastboot-windows devices
3. If your device is properly recognized, it is necessary to return the serial number. Use the code:
fastboot-windows oem rebootRUU
4. Your phone will now restart. The screen of your phone will be black with a gray-silver logo «HTC».
5. After that, we need to reinstall the original firmware. It may take a few minutes, as the transfer of distribution firmware from PC to phone is not fast. Enter the code:
fastboot-windows flash zip StockRom.zip
In rare cases, the installation stops and the user pops up a warning that it is necessary to immediately repeat the installation. Do not panic, just type «fastboot-windows flash zip StockRom.zip» again and it will work.
7. Once it's over, wait a few minutes, then restart your phone, using the code:
fastboot-windows reboot
it's all
You have to be installed in the phone firmware version 1.29.401.3
Is performed on the RST(Russia) rhyme. But there is a chance that this can return any stock rom on any cid. just before it in the folder TOOLS needed to replace an existing zip StockRom, your original zip
download tools from where?
ezab said:
download tools from where?
Click to expand...
Click to collapse
You can get misc_version from here: http://forum.xda-developers.com/showthread.php?t=1399331
hi
actually i have followed all of ur step
but this error always occured
about hboot version is older
C:\Android>fastboot flash zip rom.zip
sending 'zip' (407580 KB)...
OKAY [ 56.535s]
writing 'zip'...
(bootloader) adopting the signature contained in this image...
(bootloader) signature checking...
(bootloader) zip header checking...
(bootloader) zip info parsing...
(bootloader) checking model ID...
(bootloader) checking custom ID...
(bootloader) checking main version...
(bootloader) checking hboot version...
FAILED (remote: 44 hboot version check fail)
finished. total time: 127.671s

Fastboot Driver

I am trying to put a ROM on the TF300. I have Unlocked the tablet and installed the ADB driver. When I boot into recovery and the USB icon it asks for a driver for fastboot. I can't seem to get that anywhere. I have the Android SDK installed and java etc. Where is the driver located? I look in the USB driver folder but its not in their...
If you need just fastboot, use this guide, that you will find in the index for tf300 (General & Dev forums)
HELP FOR FLASH MORE FASTER WHEN YOU USE FASTBOOT LINE COMMAND​
If you have got a problem with your adb or fastboot or recovery....it's very simply and faster
use this:
Download this file "fastboot.zip"
Install this file somewhere in one folder which is named "fastboot" on your PC
=> disk C: root
Unzipped this file on the folder "fastboot" and you will find 3 files:
- adb.exe
- AdbWinApi.dll
- fastboot.exe
and when you need to push something by the bootloader, you can use it.
Don't forget to push on this folder the file that you need. For exemple: boot.img or a recovery.img, etc...
The line command is :
Code:
c:\fastboot>
Enter
Code:
c:\fastboot>fastboot flash recovery recovery.img
Enter
If you want to flash the "recovery.img" file
******************************************************************
******************************************************************
If you want to know all lines of command
Code:
c:\fastboot>fastboot
Code:
usage: fastboot [ ]
commands:
update reflash device from update.zip
flashall flash boot + recovery + system
flash [ ] write a file to a flash partition
erase erase a flash partition
getvar display a bootloader variable
boot [ ] download and boot kernel
flash:raw boot [ ] create bootimage and flash it
devices list all connected devices
continue continue with autoboot
reboot reboot device normally
reboot-bootloader reboot device into bootloader
help show this help message
options:
-w erase userdata and cache
-s specify device serial number
-p specify product name
-c override kernel commandline
-i specify a custom USB vendor id
-b specify a custom kernel base address
-n specify the nand page size. default: 2048
And if you have some problems with your drivers, you can use this : How to install Universal Naked Drivers
Sent from my N7 3G with DroiDevs premium between sky and earth.
I got it to work thanks!

[NEED HELP] Partition of recovery for Zenfone 5 ( CM 12.1)

I am a mid type of developer certified by me
My Zenfone 5 is hard-bricked and I tried everything to enter fastboot. iSoc and xfstk downloader showing error or refusing to accept my phone.
But luckily I can boot the phone in CyanogenMOd.
So I was trying to flash the recovery via terminal
Upper part can be ignored.
Command lines that doesn't work:
Code:
$ su
# flash_image recovery /sdcard/recovery.img
Optional I have tried
Code:
$ su
Code:
# dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p18
So the output was
Code:
29919+0 records in
29919+0 records out
15318521 bytes transferred in 0.342 secs (35459555 bytes/sec)
After that I have tried to reboot into recovery with
Code:
[email protected]:/ # reboot recovery
Well. The phone doesn't reboot into recovery. What I can guess is the partition mmcblk0p18 was wrong.
I tried the command
Code:
mount
to get the proper answer from the device. It was too hard to get the answer or I am junior on that.
So, can anyone give me the proper partition?
smnshuvo said:
I am a mid type of developer certified by me
My Zenfone 5 is hard-bricked and I tried everything to enter fastboot. iSoc and xfstk downloader showing error or refusing to accept my phone.
But luckily I can boot the phone in CyanogenMOd.
So I was trying to flash the recovery via terminal
Upper part can be ignored.
Command lines that doesn't work:
Code:
$ su
# flash_image recovery /sdcard/recovery.img
Optional I have tried
Code:
$ su
Code:
# dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p18
So the output was
Code:
29919+0 records in
29919+0 records out
15318521 bytes transferred in 0.342 secs (35459555 bytes/sec)
After that I have tried to reboot into recovery with
Code:
[email protected]:/ # reboot recovery
Well. The phone doesn't reboot into recovery. What I can guess is the partition mmcblk0p18 was wrong.
I tried the command
Code:
mount
to get the proper answer from the device. It was too hard to get the answer or I am junior on that.
So, can anyone give me the proper partition?
Click to expand...
Click to collapse
Reffering to this and this Roms fstable, recovery can be found at:
Code:
/dev/block/by-name/recovery
I could not find the mmcblk number, it seems the partition mmcblk0p1 is used for recovery, boot and fastboot (look here), but I cannot confirm that. But maybe the thread help you a little bit.
Yes. Helped a bit. Thanks. :laugh:

Fetching TWG10 Factory imgs+Introduction of Android Device Drivers

Notice : , First of all ,you are responsible for any damages on your tablet and I do not accept any responsibility for that , by reading and doing these procedures , you have already accepted its responsibility by yourself only , secondly this knowledge for Dev people much more ! , of course its written such way that newbies can understand too .
Click to expand...
Click to collapse
Before starting about fetching Stock ROM of TWG10 , maybe you ask ,what is TWG10 ? which Tablet is it ? ,so you can know and Find it from here : Introduction of Datamini TWG10 .
So , we pay attention some introduction and requirements in some steps then considering to the main .
Using of Ubuntu has far better features and advantage respect to Windows to fetch the Stock ROM of any Android devices , So we use Ubuntu too.
First Step is to Install ADB and Fastboot for Ubuntu from here using Terminal of Ubuntu.
Second step is to root your device , Rooting will be released so many privileges that make us to fetch the Stock ROM of any Android Devices .
One of the common and famous way of rooting Android devices is booting TWRP recovery from fastboot and Flashing SuperSu, but when there is no TWRP recovery for your device , you can port and compile it for your device : Porting TWRP From Source .
But always there is a final and better way to root your device which is so easy too -> UNIVERSAL GUIDE for Rooting Any Android Device Manually ! which has worked and been tested on Intel Atom based processor devices .
<<Fetching Factory Imgs>> :
After installing the SU ,now we can access to Android partition scheme of TWG10 , just connect your device through its cable to your PC (Ubuntu) , hoping you have already made USB debugging on in Developer options , just open a new terminal and write
Code:
adb devices
, you should see Baytrail000... in the last line , now command in the terminal ,
Code:
adb shell
and then when it starts , you will see your phone code name ,[email protected]_phone_32:/$ ,it means now you can get controlled fully of your tablet , just type
Code:
su
and press Enter , the information of Android partition scheme is located in /dev/block/platform/dw_mmc/by-name such that , the dw_mmc for TWG10 is 808060F14:00 let's use
Code:
ls -l /dev/block/platform/808060F14:00/by-name
to find locations of , boot.img , system.img, recovery.img and so on(Factory imgs) you will see such below photo : ( you can save this info in your internal storage ,
Code:
ls -la /dev/block/platform/808060F14:00/by-name > sdcard/your selective name.txt
)
also by commanding cat /proc/partition in terminal , you find some info about your tablet partition too
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
As you see ,you can find location of each img file in your device for example : boot.img is in /dev/block/mmcblk0p5 now its time to fetch them using
Code:
dd if=Directory of source of=Directory of Destination
for example :
Code:
dd if=/dev/block/mmcblk0p5 of=/sdcard/boot.img
sdcard is absolute location of your Internal storage :/storage/emulated/legancy.(Notice : NEVER TOUCH basic_data_partition , its data of your windows OS , NEVER TOUCH ESP , its location of your UEFI bios insyde software , NEVER TOUCH Microsoft_reserve_partition , the only img files that you need to dd is boot.img. fastboot.img (bootloader) , system.img, recovery.img ,config.img ,factory.img, these two contains vendor.img and radio.img related connectivity and WIFI)
after fetching all imgs of stock ROM (Factory imgs) of TWG10 , its the time to pull them to your PC .
Just type exit and enter , write in the terminal ,
Code:
adb pull /sdcard/"img File" /" your selective Directory in your PC"
for example :
Code:
adb pull /sdcard/boot.img /home/amir/twg10_imgs
.
Do not worry , if you cant fetch all factory images , you can download them from here :Factory imgs of TWG10
But the important question is : why we need those factory imgs ? because when the Android OS gets damaged and its not booted up or in boot looping condition, we can survive it in below instruction :
Reviving TWG10 Android OS by Flashing Factory imgs via Fastboot:
open a new terminal in the directory which those factory images are there and placed and then write in the terminal :
Code:
adb reboot -bootloader
(we will boot to fastboot)
after restarting :
Code:
sudo fastboot devices
now we need to unlock bootloader for flashing
Code:
sudo fastboot oem unlock
sudo fastboot flashing unlock
sudo fastboot reboot bootloader
after restarting to bootloader ,you should press volume up to enter to fastboot
now its the time for erasing necessary partition, as we saw , ls -l /dev/block/platform/808060F14:00/by-name , shows the portions by name for example /dev/block/mmcblk0p5 is called boot .
so we use this code sudo fastboot erase 'partition by name'
Code:
sudo fastboot erase boot
sudo fastboot erase cache
sudo fastboot erase recovery
sudo fastboot erase date (userdata)
sudo fastboot erase system
now flashing 'partition by name'
sudo fastboot flash 'partition by name' 'img file association'
Code:
sudo fastboot flash boot boot.img
sudo fastboot flash fastboot fastboot.img (flashing bootloader)
sudo fastboot reboot bootloader (reboot to fastboot)
sudo fastboot flash recovery recovery.img
sudo fastboot flash system system.img
sudo fastboot flash config config.img (this is radio.img)
sudo fastboot flash factory factory.img (this is vendor.img)
sudo fastboot reboot
Congratulation ! your stock Android revived !
you can also download and install any Android X86 on your TWG10 , you can make bootable flash memory using Rufus but its important to say , you should use GPT Partition scheme for UEFI in partition scheme and target system type , another important notice is : when your bootable flash memory gets ready , you should open your flash memory and go to /boot/grub and open grub.cfg by gedit and modify it , after root=/dev/ram0 you should "space" and type nomodeset vga=5785 for live , debug and installation and then save , otherwise it wont be booted into TWG10!.
By pressing ESC before going to any OS ,you can select the bootable flash memory in boot manager and enter to boot menu of android X86 , if you did not modify the grub.cfg , you can press E in boot menu of Android X86 installation and modify it ( type and add nomodeset vga=5785 after root=/dev/ram0) and press F10 , but because of the orientation of tablet is in horizontal , maybe its difficult to modify , so its better to modify it before booting the flash memory and its better to install Android X86 on a SD card or another flash memory , because 32 GB is not enough for 3 OSs!
Another notice is you should pay attention to above partition scheme in the time of Android X86 installation.
but when you booted up the Android X86 , nothing works , touch , rotation ,sound and ......
this is because of no one of Android Drivers is installed for TWG10 , so we pay attention to ->
<<Introduction of Android Device Drivers >>
lets your TWG10 is connected to your PC.
Android Device Drivers (modules) are C program in fact , they are kind of modules which will be added to kernel of Android OS and they load and unload in the time of demand , these C program files after compiling ,they convert to the files with extension .ko , these .ko Files are located in /lib/modules .
these ko files are taking care of Device functionality (how they perform and operate) and files of hardware devices( such HDMI , hard disk , sound , touchscreen , WIFI...) are located in /dev
you can see the files of hardware devices using these codes in a terminal :
Code:
adb shell
ls -l /dev/i2c-1
you will see
Code:
crw------- root root 89, 1 2017-11-11 01:02 i2c-1
if the first letter is C its character device , 89 is major number using for identify the driver (which module or .ko file is used for this device file) , after 89 , there is a ',' and then 1 its a minor number which is used to distinguish between devices with same driver ,
for example if we write
Code:
adb shell
ls -l /dev/i2c-2
you will see
Code:
crw------- root root 89, 2 2017-11-11 01:02 i2c-2
i2c-2 used same driver file (major number is same) but another device file (minor number different)
we have two type devices , block devices and character devices.
block devices have a buffer for a request so they can have best response , block devices takes input and gives output only , but character devices can takes so many inputs and give so many outputs .
to see blocks and character devices on your TWG10 , you can use below codes :
Code:
adb shell
cat proc/devices
to create a device file ,using this code :
open a terminal :
Code:
mknod dev/'device name' 'major number' 'minor number'
for example :
Code:
adb shell
mknod dev/i2c 89 3
In fact modules (device drivers ) and devices file (hardware) are connect to each other by major number .
You can pull modules which are control the functionality of devices (hardware) in your PC from the stock Android using ADB and Ubuntu Terminal :
just open a new Terminal , type :
Code:
adb devices
adb pull /lib/modules 'A directory in your PC"
now if you want to see these .ko files are about which Device Driver , just open a terminal in the directory that .ko files are type :
Code:
modinfo 'name of the ko file'
for example
Code:
modinfo 8723bs.ko
We can also see Device Drivers which are activated by using lsmod or cat /proc/modules :
open a new terminal and type :
Code:
adb shell
lsmode or cat/proc/modules
For adding a driver or module to the kernel ,
open a terminal in the directory of .ko file where you pulled them into your PC
Code:
adb push 'directory of modules(drivers) in the PC' /lib/modules
adb shell
modprobe 'the pushed file name'
for example :
Code:
adb push /home/amir/twg10_imgs/drivers /lib/modules
adb shell
modprobe 8723bs
also with insmod command , we can add a driver to the kernel , but its dependencies command , we should add other related driver(module) too.
for example
Code:
adb shell
insmod ./8723bs.ko
the story still has not be started , it will be continued !
amirhtc said:
Before starting about fetching Stock ROM of TWG10 , maybe you ask ,what is TWG10 ? which Tablet is it ? ,so you can know and Find it from here : Introduction of Datamini TWG10 .
So , we pay attention some introduction and requirements in some steps then considering to the main .
Using of Ubuntu has far better features and advantage respect to Windows to fetch the Stock ROM of any Android devices , So we use Ubuntu too.
First Step is to Install ADB and Fastboot for Ubuntu from here using Terminal of Ubuntu.
Second step is to root your device , Rooting will be released so many privileges that make us to fetch the Stock ROM of any Android Devices .
One of the common and famous way of rooting Android devices is booting TWRP recovery from fastboot and Flashing SuperSu, but when there is no TWRP recovery for your device , you can port and compile it for your device : Porting TWRP From Source .
But always there is a final and better way to root your device which is so easy too -> UNIVERSAL GUIDE for Rooting Any Android Device Manually ! which has worked and been tested on Intel Atom based processor devices .
<<Fetching Factory Imgs>> :
After installing the SU ,now we can access to Android partition scheme of TWG10 , just connect your device through its cable to your PC (Ubuntu) , hoping you have already made USB debugging on in Developer options , just open a new terminal and write
Code:
adb devices
, you should see Baytrail000... in the last line , now command in the terminal ,
Code:
adb shell
and then when it starts , you will see your phone code name ,[email protected]_phone_32:/$ ,it means now you can get controlled fully of your tablet , just type
Code:
su
and press Enter , the information of Android partition scheme is located in /dev/block/platform/dw_mmc/by-name such that , the dw_mmc for TWG10 is 808060F14:00 let's use
Code:
ls -l /dev/block/platform/808060F14:00/by-name
to find locations of , boot.img , system.img, recovery.img and so on(Factory imgs) you will see such below photo : ( you can save this info in your internal storage ,
Code:
ls -la /dev/block/platform/808060F14:00/by-name > sdcard/your selective name.txt
)
also by commanding cat /proc/partition in terminal , you find some info about your tablet partition too
As you see ,you can find location of each img file in your device for example : boot.img is in /dev/block/mmcblk0p5 now its time to fetch them using
Code:
dd if=Directory of source of=Directory of Destination
for example :
Code:
dd if=/dev/block/mmcblk0p5 of=/sdcard/boot.img
sdcard is absolute location of your Internal storage :/storage/emulated/legancy.(Notice : NEVER TOUCH basic_data_partition , its data of your windows OS , NEVER TOUCH ESP , its location of your UEFI bios insyde software , NEVER TOUCH Microsoft_reserve_partition , the only img files that you need to dd is boot.img. fastboot.img (bootloader) , system.img, recovery.img ,config.img ,factory.img, these two contains vendor.img and radio.img related connectivity and WIFI)
after fetching all imgs of stock ROM (Factory imgs) of TWG10 , its the time to pull them to your PC .
Just type exit and enter , write in the terminal ,
Code:
adb pull /sdcard/"img File" /" your selective Directory in your PC"
for example :
Code:
adb pull /sdcard/boot.img /home/amir/twg10_imgs
.
Do not worry , if you cant fetch all factory images , you can download them from here :Factory imgs of TWG10
But the important question is : why we need those factory imgs ? because when the Android OS gets damaged and its not booted up or in boot looping condition, we can survive it in below instruction :
Reviving TWG10 Android OS by Flashing Factory imgs via Fastboot:
open a new terminal in the directory which those factory images are there and placed and then write in the terminal :
Code:
adb reboot -bootloader
(we will boot to fastboot)
after restarting :
Code:
sudo fastboot devices
now we need to unlock bootloader for flashing
Code:
sudo fastboot oem unlock
sudo fastboot flashing unlock
sudo fastboot reboot bootloader
after restarting to bootloader ,you should press volume up to enter to fastboot
now its the time for erasing necessary partition, as we saw , ls -l /dev/block/platform/808060F14:00/by-name , shows the portions by name for example /dev/block/mmcblk0p5 is called boot .
so we use this code sudo fastboot erase 'partition by name'
Code:
sudo fastboot erase boot
sudo fastboot erase cache
sudo fastboot erase recovery
sudo fastboot erase date (userdata)
sudo fastboot erase system
now flashing 'partition by name'
sudo fastboot flash 'partition by name' 'img file association'
Code:
sudo fastboot flash boot boot.img
sudo fastboot flash fastboot fastboot.img (flashing bootloader)
sudo fastboot reboot bootloader (reboot to fastboot)
sudo fastboot flash recovery recovery.img
sudo fastboot flash system system.img
sudo fastboot flash config config.img (this is radio.img)
sudo fastboot flash factory factory.img (this is vendor.img)
sudo fastboot reboot
Congratulation ! your stock Android revived !
you can also download and install any Android X86 on your TWG10 , you can make bootable flash memory using Rufus but its important to say , you should use GPT Partition scheme for UEFI in partition scheme and target system type , another important notice is : when your bootable flash memory gets ready , you should open your flash memory and go to /boot/grub and open grub.cfg by gedit and modify it , after root=/dev/ram0 you should "space" and type nomodeset vga=5785 for live , debug and installation and then save , otherwise it wont be booted into TWG10!.
By pressing ESC before going to any OS ,you can select the bootable flash memory in boot manager and enter to boot menu of android X86 , if you did not modify the grub.cfg , you can press E in boot menu of Android X86 installation and modify it ( type and add nomodeset vga=5785 after root=/dev/ram0) and press F10 , but because of the orientation of tablet is in horizontal , maybe its difficult to modify , so its better to modify it before booting the flash memory and its better to install Android X86 on a SD card or another flash memory , because 32 GB is not enough for 3 OSs!
Another notice is you should pay attention to above partition scheme in the time of Android X86 installation.
but when you booted up the Android X86 , nothing works , touch , rotation ,sound and ......
this is because of no one of Android Drivers is installed for TWG10 , so we pay attention to ->
<<Introduction of Android Device Drivers >>
lets your TWG10 is connected to your PC.
Android Device Drivers (modules) are C program in fact , they are kind of modules which will be added to kernel of Android OS and they load and unload in the time of demand , these C program files after compiling ,they convert to the files with extension .ko , these .ko Files are located in /lib/modules .
these ko files are taking care of Device functionality (how they perform and operate) and files of hardware devices( such HDMI , hard disk , sound , touchscreen , WIFI...) are located in /dev
you can see the files of hardware devices using these codes in a terminal :
Code:
adb shell
ls -l /dev/i2c-1
you will see
Code:
crw------- root root 89, 1 2017-11-11 01:02 i2c-1
if the first letter is C its character device , 89 is major number using for identify the driver (which module or .ko file is used for this device file) , after 89 , there is a ',' and then 1 its a minor number which is used to distinguish between devices with same driver ,
for example if we write
Code:
adb shell
ls -l /dev/i2c-2
you will see
Code:
crw------- root root 89, 2 2017-11-11 01:02 i2c-2
i2c-2 used same driver file (major number is same) but another device file (minor number different)
we have two type devices , block devices and character devices.
block devices have a buffer for a request so they can have best response , block devices takes input and gives output only , but character devices can takes so many inputs and give so many outputs .
to see blocks and character devices on your TWG10 , you can use below codes :
Code:
adb shell
cat proc/devices
to create a device file ,using this code :
open a terminal :
Code:
mknod dev/'device name' 'major number' 'minor number'
for example :
Code:
adb shell
mknod dev/i2c 89 3
In fact modules (device drivers ) and devices file (hardware) are connect to each other by major number .
You can pull modules which are control the functionality of devices (hardware) in your PC from the stock Android using ADB and Ubuntu Terminal :
just open a new Terminal , type :
Code:
adb devices
adb pull /lib/modules 'A directory in your PC"
now if you want to see these .ko files are about which Device Driver , just open a terminal in the directory that .ko files are type :
Code:
modinfo 'name of the ko file'
for example
Code:
modinfo 8723bs.ko
We can also see Device Drivers which are activated by using lsmod or cat /proc/modules :
open a new terminal and type :
Code:
adb shell
lsmode or cat/proc/modules
For adding a driver or module to the kernel ,
open a terminal in the directory of .ko file where you pulled them into your PC
Code:
adb push 'directory of modules(drivers) in the PC' /lib/modules
adb shell
modprobe 'the pushed file name'
for example :
Code:
adb push /home/amir/twg10_imgs/drivers /lib/modules
adb shell
modprobe 8723bs
also with insmod command , we can add a driver to the kernel , but its dependencies command , we should add other related driver(module) too.
for example
Code:
adb shell
insmod ./8723bs.ko
the story still has not be started , it will be continued !
Click to expand...
Click to collapse
Is it possible to get a copy of your files?
Upload factory image
If you can, kindly please upload the factory images again
If possible in google drive
Atleat it won't get deleted
amirhtc said:
Before starting about fetching Stock ROM of TWG10 , maybe you ask ,what is TWG10 ? which Tablet is it ? ,so you can know and Find it from here : Introduction of Datamini TWG10 .
So , we pay attention some introduction and requirements in some steps then considering to the main .
Using of Ubuntu has far better features and advantage respect to Windows to fetch the Stock ROM of any Android devices , So we use Ubuntu too.
First Step is to Install ADB and Fastboot for Ubuntu from here using Terminal of Ubuntu.
Second step is to root your device , Rooting will be released so many privileges that make us to fetch the Stock ROM of any Android Devices .
One of the common and famous way of rooting Android devices is booting TWRP recovery from fastboot and Flashing SuperSu, but when there is no TWRP recovery for your device , you can port and compile it for your device : Porting TWRP From Source .
But always there is a final and better way to root your device which is so easy too -> UNIVERSAL GUIDE for Rooting Any Android Device Manually ! which has worked and been tested on Intel Atom based processor devices .
<<Fetching Factory Imgs>> :
After installing the SU ,now we can access to Android partition scheme of TWG10 , just connect your device through its cable to your PC (Ubuntu) , hoping you have already made USB debugging on in Developer options , just open a new terminal and write
Code:
adb devices
, you should see Baytrail000... in the last line , now command in the terminal ,
Code:
adb shell
and then when it starts , you will see your phone code name ,[email protected]_phone_32:/$ ,it means now you can get controlled fully of your tablet , just type
Code:
su
and press Enter , the information of Android partition scheme is located in /dev/block/platform/dw_mmc/by-name such that , the dw_mmc for TWG10 is 808060F14:00 let's use
Code:
ls -l /dev/block/platform/808060F14:00/by-name
to find locations of , boot.img , system.img, recovery.img and so on(Factory imgs) you will see such below photo : ( you can save this info in your internal storage ,
Code:
ls -la /dev/block/platform/808060F14:00/by-name > sdcard/your selective name.txt
)
also by commanding cat /proc/partition in terminal , you find some info about your tablet partition too
As you see ,you can find location of each img file in your device for example : boot.img is in /dev/block/mmcblk0p5 now its time to fetch them using
Code:
dd if=Directory of source of=Directory of Destination
for example :
Code:
dd if=/dev/block/mmcblk0p5 of=/sdcard/boot.img
sdcard is absolute location of your Internal storage :/storage/emulated/legancy.(Notice : NEVER TOUCH basic_data_partition , its data of your windows OS , NEVER TOUCH ESP , its location of your UEFI bios insyde software , NEVER TOUCH Microsoft_reserve_partition , the only img files that you need to dd is boot.img. fastboot.img (bootloader) , system.img, recovery.img ,config.img ,factory.img, these two contains vendor.img and radio.img related connectivity and WIFI)
after fetching all imgs of stock ROM (Factory imgs) of TWG10 , its the time to pull them to your PC .
Just type exit and enter , write in the terminal ,
Code:
adb pull /sdcard/"img File" /" your selective Directory in your PC"
for example :
Code:
adb pull /sdcard/boot.img /home/amir/twg10_imgs
.
Do not worry , if you cant fetch all factory images , you can download them from here :Factory imgs of TWG10
But the important question is : why we need those factory imgs ? because when the Android OS gets damaged and its not booted up or in boot looping condition, we can survive it in below instruction :
Reviving TWG10 Android OS by Flashing Factory imgs via Fastboot:
open a new terminal in the directory which those factory images are there and placed and then write in the terminal :
Code:
adb reboot -bootloader
(we will boot to fastboot)
after restarting :
Code:
sudo fastboot devices
now we need to unlock bootloader for flashing
Code:
sudo fastboot oem unlock
sudo fastboot flashing unlock
sudo fastboot reboot bootloader
after restarting to bootloader ,you should press volume up to enter to fastboot
now its the time for erasing necessary partition, as we saw , ls -l /dev/block/platform/808060F14:00/by-name , shows the portions by name for example /dev/block/mmcblk0p5 is called boot .
​so we use this code sudo fastboot erase 'partition by name'
Code:
sudo fastboot erase boot
sudo fastboot erase cache
sudo fastboot erase recovery
sudo fastboot erase date (userdata)
sudo fastboot erase system
now flashing 'partition by name'
sudo fastboot flash 'partition by name' 'img file association'
Code:
sudo fastboot flash boot boot.img
sudo fastboot flash fastboot fastboot.img (flashing bootloader)
sudo fastboot reboot bootloader (reboot to fastboot)
sudo fastboot flash recovery recovery.img
sudo fastboot flash system system.img
sudo fastboot flash config config.img (this is radio.img)
sudo fastboot flash factory factory.img (this is vendor.img)
sudo fastboot reboot
Congratulation ! your stock Android revived !
you can also download and install any Android X86 on your TWG10 , you can make bootable flash memory using Rufus but its important to say , you should use GPT Partition scheme for UEFI in partition scheme and target system type , another important notice is : when your bootable flash memory gets ready , you should open your flash memory and go to /boot/grub and open grub.cfg by gedit and modify it , after root=/dev/ram0 you should "space" and type nomodeset vga=5785 for live , debug and installation and then save , otherwise it wont be booted into TWG10!.
By pressing ESC before going to any OS ,you can select the bootable flash memory in boot manager and enter to boot menu of android X86 , if you did not modify the grub.cfg , you can press E in boot menu of Android X86 installation and modify it ( type and add nomodeset vga=5785 after root=/dev/ram0) and press F10 , but because of the orientation of tablet is in horizontal , maybe its difficult to modify , so its better to modify it before booting the flash memory and its better to install Android X86 on a SD card or another flash memory , because 32 GB is not enough for 3 OSs!
Another notice is you should pay attention to above partition scheme in the time of Android X86 installation.
​but when you booted up the Android X86 , nothing works , touch , rotation ,sound and ......
this is because of no one of Android Drivers is installed for TWG10 , so we pay attention to ->
<<Introduction of Android Device Drivers >>
lets your TWG10 is connected to your PC.
Android Device Drivers (modules) are C program in fact , they are kind of modules which will be added to kernel of Android OS and they load and unload in the time of demand , these C program files after compiling ,they convert to the files with extension .ko , these .ko Files are located in /lib/modules .
these ko files are taking care of Device functionality (how they perform and operate) and files of hardware devices( such HDMI , hard disk , sound , touchscreen , WIFI...) are located in /dev
you can see the files of hardware devices using these codes in a terminal :
Code:
adb shell
ls -l /dev/i2c-1
you will see
Code:
crw------- root root 89, 1 2017-11-11 01:02 i2c-1
if the first letter is C its character device , 89 is major number using for identify the driver (which module or .ko file is used for this device file) , after 89 , there is a ',' and then 1 its a minor number which is used to distinguish between devices with same driver ,
for example if we write
Code:
adb shell
ls -l /dev/i2c-2
you will see
Code:
crw------- root root 89, 2 2017-11-11 01:02 i2c-2
i2c-2 used same driver file (major number is same) but another device file (minor number different)
we have two type devices , block devices and character devices.
block devices have a buffer for a request so they can have best response , block devices takes input and gives output only , but character devices can takes so many inputs and give so many outputs .
to see blocks and character devices on your TWG10 , you can use below codes :
Code:
adb shell
cat proc/devices
to create a device file ,using this code :
open a terminal :
Code:
mknod dev/'device name' 'major number' 'minor number'
for example :
Code:
adb shell
mknod dev/i2c 89 3
In fact modules (device drivers ) and devices file (hardware) are connect to each other by major number .
You can pull modules which are control the functionality of devices (hardware) in your PC from the stock Android using ADB and Ubuntu Terminal :
just open a new Terminal , type :
Code:
adb devices
adb pull /lib/modules 'A directory in your PC"
​now if you want to see these .ko files are about which Device Driver , just open a terminal in the directory that .ko files are type :
Code:
modinfo 'name of the ko file'
for example
Code:
modinfo 8723bs.ko
​We can also see Device Drivers which are activated by using lsmod or cat /proc/modules :
open a new terminal and type :
Code:
adb shell
lsmode or cat/proc/modules
For adding a driver or module to the kernel ,
open a terminal in the directory of .ko file where you pulled them into your PC
Code:
adb push 'directory of modules(drivers) in the PC' /lib/modules
adb shell
modprobe 'the pushed file name'
for example :
Code:
adb push /home/amir/twg10_imgs/drivers /lib/modules
adb shell
modprobe 8723bs
also with insmod command , we can add a driver to the kernel , but its dependencies command , we should add other related driver(module) too.
for example
Code:
adb shell
insmod ./8723bs.ko
the story still has not be started , it will be continued !
Click to expand...
Click to collapse
please upload the factory images again

[RECOVERY] TWRP 3.5.2 | Unihertz Jelly 2

How to install:
Unlock bootloader:
Boot your device into the official OS.
Go to Settings > About phone, tap the "build number" several times to enable developer settings.
Go to Settings > System > Developer Settings, enable OEM unlocking and ADB debugging.
Connect your phone to your PC and open a terminal or a command line window.
Run adb reboot bootloader on your PC (there is no way to enter bootloader directly, only possible through adb).
Once your device has finished booting run fastboot flashing unlock and comfirm unlock on device (THIS WILL WIPE ALL DATA!).
Run fastboot reboot to reboot your device and now you should see an unlocked warning during boot screen.
Disable AVB:
Download vbmeta.img from the latest release page of your device.
Connect your phone to your PC and open a terminal or a command line window.
Run adb reboot bootloader on your PC to put your device in bootloader mode.
Once your device has finished booting run fastboot flash --disable-verification --disable-verity vbmeta vbmeta.img
Then run fastboot flash --disable-verification --disable-verity vbmeta_system vbmeta.img
Also run fastboot flash --disable-verification --disable-verity vbmeta_vendor vbmeta.img
Flash recovery image:
Connect your phone to your PC and open a terminal or a command line window.
Run adb reboot bootloader on your PC to put your device in bootloader mode.
Once your device has finished booting run fastboot erase recovery. For some reason, image may be not actually flashed, even if fastboot reported success (at least over the stock recovery image), so in order make sure that the custom image is always flashed it's better to always erase the partition before flashing. After the erasing run fastboot flash recovery recovery.img
Run fastboot reboot and after the screen goes dark press volume up until you see the TWRP logo. Also you can type fastboot reboot recovery to boot to recovery mode immediately.
Please note that booting in stock ROM will bring stock recovery back.
This recovery image is built using binaries from non-european (TEE) version of Jelly 2. Theoretically it should work on european (EEA). If it won't - contact me, I'll prepare an image based on EEA binaries.
Source code https://github.com/Meetoul/twrp_device_Unihertz_Jelly2
Thanks!
This fantastic!
its work on EEA!
Meetoul said:
Source code https://github.com/Meetoul/twrp_device_Unihertz_Jelly2
Click to expand...
Click to collapse
I just received my Jelly 2. It was on 2020 and I went straight through your files. Your TWRP does not respond on my European Jelly 2. Meaning, the touch screen does not respond. But I connected an USB trackball and switched in between adb sideloads. So I finally got it working.
For some reason during reboot TWRP warns me that there is no OS installed. But LoS 18.1 (yours) booted fine. Also flashed opengapps 2707 nano.
After a reboot (phone is still restoring apps) there is a "serial console is enabled" message "performance is impacted, check bootloader". Any instructions on how to get rid of that?.
I cannot seem to mount system as R/W with GSI image from https://github.com/phhusson/treble_experimentations/releases from within TWRP. I guess that's a more general problem, though
Any ideas?
kkazakov13 said:
I cannot seem to mount system as R/W with GSI image from https://github.com/phhusson/treble_experimentations/releases from within TWRP. I guess that's a more general problem, though
Any ideas?
Click to expand...
Click to collapse
Dave you tried the latest release a suggested by Meetoul?
[ROM] [UNOFFICIAL] Lineage OS 17.1 | Unihertz Jelly 2
https://drive.google.com/drive/u/0/folders/1VSmj_-a1PYNzFWtUfbsDGWg4uIh-Tgkd This ROM is built using binaries from non-european (TEE) version of Jelly 2. Theoretically it should work on european (EEA). If it won't - contact me, I'll prepare ROW...
forum.xda-developers.com
Release Fix gt1151qm touch in recovery · Meetoul/twrp_device_Unihertz_Jelly2_TEE
Recovery image based on new kernel image with patches for both gt1x and gt1151qm touch panel drivers.
github.com
Great Job!
I have Jelly2_JP.
I tried your recovery.img for Jelly2_TEE.
It can boot my Jelly2_JP, and it can enable adb shell, but it looped the splash screen.
But I execute following command in adb shell, twrp starts gui("Keep System Read only?" screen)
Jelly2_TEE:/ # mount -o ro /dev/block/mapper/system /
Touchscreen works fine.
Next, I tried to build twrp for Jelly2_JP using your device tree.
But it has same problem. (It looped the splash screen until I mount system partition.)
Do you have any advice?
Attachments
recovery_tee.log is pulled file from /tmp/recovery.log in your twrp for Jelly2_TEE. Line 1119 is after I mount system partition by adb shell.
recovery_jp.log is pulled file from /tmp/recovery.log in my twrp for Jelly2_JP. Line 1356 is after I mount system partition by adb shell.
My build instructions
$ cd ~/twrp
$ repo init -u https://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni.git -b twrp-10.0
$ vi .repo/local_manifests/roomservice.xml
$ repo sync --force-sync
$ cd device/Unihertz
$ cp -r Jelly2_TEE Jelly2_JP
$ cd Jelly2_JP
$ mv omni_Jelly2_TEE.mk omni_Jelly2_JP.mk
$ grep -l Jelly2_TEE * | xargs sed -i 's/Jelly2_TEE/Jelly2_JP/g'
$ grep -l g55v71c2k_dfl_tee * | xargs sed -i 's/g55v71c2k_dfl_tee/g55v71c2k_dfl_jp_felica/g'
$ ./extract-files.sh ~/stock_jp/extracted
$ unpack_bootimg --boot_img ~/stock_jp/recovery.img --out ~/stock_jp/recovery
$ cp ~/stock_jp/recovery/kernel prebuilt/Image.gz
$ cp ~/stock_jp/recovery/dtb prebuilt/dtb/mt6771.dtb
$ cp ~/stock_jp/recovery/recovery_dtbo prebuilt/dtbo.img
$ cd ~/twrp
$ source build/envsetup.sh
$ lunch omni_Jelly2_JP-eng
$ mka recoveryimage
$ ls out/target/product/Jelly2_JP/recovery/root/vendor
bin etc
$ cp -r vendor/Unihertz/Jelly2_JP/proprietary/reovery/root/vendor out/target/product/Jelly2_JP/recovery/root
$ mka recoveryimage
file upload again.
Sorry, I can't upload Attach files.
I clicked "Attach files" button and choose file.
I clicked "Save" button, but file link did not inserted.
I uploaded recovery.log to github.
How to get vbmeta.img
Three knife said:
How to get vbmeta.img
Click to expand...
Click to collapse
Direct Link
Google Drive: Sign-in
Access Google Drive with a Google account (for personal use) or Google Workspace account (for business use).
drive.google.com
See Also
Jelly 2 firmware made available by Unihertz
A post to let people interested in small Android phones know that the firmware of the Jelly 2 has been made available by Unihertz. Would be great if a LineageOS version of this could be made...
forum.xda-developers.com
Or
[HOWTO] Flash a blank vbmeta
Hey guys, As some of you know samsung made had a bunch of different changes since the release of Android 10. It took me a week to figure it out but it was really simple. I had to do two things: Repatch the the magisk boot image with Preserve AVB...
forum.xda-developers.com
I found the crash point in Jelly2_JP.
The crash point is CHECK() on line 772 of twrp/hardware/interfaces/keymaster/4.0/support/Keymaster.cpp.
C++:
CHECK(error == ErrorCode::OK)
<< "Failed to get HMAC parameters from " << *keymaster << " error " << error;
CHECK() is defined on line 495 of twrp/system/core/base/include/android-base/logging.h
C++:
#define CHECK(x) \
LIKELY((x)) || ABORT_AFTER_LOG_FATAL_EXPR(false) || \
::android::base::LogMessage(__FILE__, __LINE__, ::android::base::DEFAULT, \
::android::base::FATAL, _LOG_TAG_INTERNAL, -1) \
.stream() \
<< "Check failed: " #x << " "
I thought /system/bin/recovery was crashing due to a bug.
But it is not a bug.
/system/bin/recovery is programmed to abort if CHECK() fails.
Next, I compared the results of CHECK().
1. using your recovery.img for Jelly2_TEE.
Code:
$ adb shell
Jelly2_TEE:/ # uname -a
Linux localhost 4.14.141+ #15 SMP PREEMPT Wed May 19 11:04:10 CST 2021 aarch64
Jelly2_TEE:/ # mount -o ro /dev/block/mapper/vendor /vendor
Jelly2_TEE:/ # md5sum /vendor/lib64/libkeymaster4.so
17f162aedb3a9584e51d7f732ebbac7f /vendor/lib64/libkeymaster4.so
Jelly2_TEE:/ # umount /vendor
Jelly2_TEE:/ # md5sum /vendor/lib64/libkeymaster4.so
22ede18944c5f47daf04d699a72717b2 /vendor/lib64/libkeymaster4.so
Jelly2_TEE:/ # logcat -v brief -d -s /system/bin/recovery
E//system/bin/recovery( 324): Failed to get IAshmemDeviceService.
W//system/bin/recovery( 324): [libfs_mgr]Warning: unknown flag: resize
W//system/bin/recovery( 324): [libfs_mgr]Warning: unknown flag: resize
I//system/bin/recovery( 324): [libfs_mgr]Created logical partition product on device /dev/block/dm-0
I//system/bin/recovery( 324): [libfs_mgr]Created logical partition system on device /dev/block/dm-1
I//system/bin/recovery( 324): [libfs_mgr]Created logical partition vendor on device /dev/block/dm-2
W//system/bin/recovery( 324): DM_DEV_STATUS failed for system_image: No such device or address
W//system/bin/recovery( 324): DM_DEV_STATUS failed for vendor_image: No such device or address
W//system/bin/recovery( 324): DM_DEV_STATUS failed for product_image: No such device or address
I//system/bin/recovery( 324): fscrypt_initialize_systemwide_keys
I//system/bin/recovery( 324): List of Keymaster HALs found:
I//system/bin/recovery( 324): Keymaster HAL #1: HardwareKeymasterDevice from TrustKernel SecurityLevel: TRUSTED_ENVIRONMENT HAL: [email protected]::IKeymasterDevice/default
F//system/bin/recovery( 324): Keymaster.cpp:150] Check failed: error == ErrorCode::OK Failed to get HMAC parameters from HardwareKeymasterDevice from TrustKernel SecurityLevel: TRUSTED_ENVIRONMENT HAL: [email protected]::IKeymasterDevice/default error SECURE_HW_COMMUNICATION_FAILED
2. using my recovery.img for Jelly2_JP.
This is built with Jelly2_JP's kernel and /vendor/*.
Code:
$ adb shell
Jelly2_JP:/ # uname -a
Linux localhost 4.14.141+ #5 SMP PREEMPT Wed May 19 12:15:37 CST 2021 aarch64
Jelly2_JP:/ # mount -o ro /dev/block/mapper/vendor /vendor
Jelly2_JP:/ # md5sum /vendor/lib64/libkeymaster4.so
17f162aedb3a9584e51d7f732ebbac7f /vendor/lib64/libkeymaster4.so
Jelly2_JP:/ # umount /vendor
Jelly2_JP:/ # md5sum /vendor/lib64/libkeymaster4.so
17f162aedb3a9584e51d7f732ebbac7f /vendor/lib64/libkeymaster4.so
Jelly2_JP:/ # logcat -v brief -d -s /system/bin/recovery
E//system/bin/recovery( 327): Failed to get IAshmemDeviceService.
W//system/bin/recovery( 327): [libfs_mgr]Warning: unknown flag: resize
W//system/bin/recovery( 327): [libfs_mgr]Warning: unknown flag: resize
I//system/bin/recovery( 327): [libfs_mgr]Created logical partition product on device /dev/block/dm-0
I//system/bin/recovery( 327): [libfs_mgr]Created logical partition system on device /dev/block/dm-1
I//system/bin/recovery( 327): [libfs_mgr]Created logical partition vendor on device /dev/block/dm-2
W//system/bin/recovery( 327): DM_DEV_STATUS failed for system_image: No such device or address
W//system/bin/recovery( 327): DM_DEV_STATUS failed for vendor_image: No such device or address
W//system/bin/recovery( 327): DM_DEV_STATUS failed for product_image: No such device or address
I//system/bin/recovery( 327): fscrypt_initialize_systemwide_keys
I//system/bin/recovery( 327): List of Keymaster HALs found:
I//system/bin/recovery( 327): Keymaster HAL #1: HardwareKeymasterDevice from TrustKernel SecurityLevel: TRUSTED_ENVIRONMENT HAL: [email protected]::IKeymasterDevice/default
F//system/bin/recovery( 327): Keymaster.cpp:150] Check failed: error == ErrorCode::OK Failed to get HMAC parameters from HardwareKeymasterDevice from TrustKernel SecurityLevel: TRUSTED_ENVIRONMENT HAL: [email protected]::IKeymasterDevice/default error SECURE_HW_COMMUNICATION_FAILED
They are same Error code SECURE_HW_COMMUNICATION_FAILED.
Unfortunately, my recovery.img wasn't improved from your recovery.img when used with Jelly2_JP.
I'm sorry for the continuous posting.
I solved the decryption by modifying omni_Jelly2_JP.mk as follows.
Code:
PRODUCT_NAME := omni_Jelly2_JP
PRODUCT_DEVICE := Jelly2_JP
PRODUCT_MODEL := Jelly2_JP
PRODUCT_BOARD := g55v71c2k_dfl_jp_felica
BUILD_FINGERPRINT := "Unihertz/Jelly2_JP/Jelly2_JP:10/QP1A.190711.020/root.20210422.092852:user/release-keys"
PRODUCT_BUILD_PROP_OVERRIDES += \
TARGET_DEVICE=Jelly2_JP \
PRODUCT_NAME=Jelly2_JP \
PRIVATE_BUILD_DESC="Jelly2-user 10 QP1A.190711.020 root.20210422.092852 release-keys"
My mistake was that I only replaced "Jelly2_TEE" with "Jelly2_JP".
I had to replace "Jelly2" with "Jelly2_JP".
Anyway, now I can display the decryption screen.
Next, I tried HOW-TO-PATCH.md.
However, the touch screen does not respond on the patched kernel.
Code:
$ head -n 1 symbl_tee.txt
ffffff81dd680800 T do_undefinstr
$ grep get_boot_mode symbl_tee.txt
ffffff81ddda5b30 T get_boot_mode
$ zcat twrp/device/Unihertz/Jelly2_TEE/prebuilt/Image.gz > Image
$ aarch64-linux-android-objdump -D -b binary -m aarch64 --adjust-vma=0xffffff81dd680000 --start-address=0xffffff81ddda5b30 Image| head
ffffff81ddda5b30: d0009cc8 adrp x8, 0xffffff81df13f000
ffffff81ddda5b34: b947ad09 ldr w9, [x8,#1964]
ffffff81ddda5b38: 7100093f cmp w9, #0x2
I think you are using a different technique to enable the touch screen, because "cmp w9, #0x2" is not patched to "cmp w9, #0x0".
Please teach me your technique after you are not busy with work.
谢谢你,我用的是中国的没有Google Play的版本,按照你的步骤成功了,不过在安装完recovery.img之后,内部存储有可能无法写入,需要在recovery里删除data分区,然后就可以了
Thanks for this!
I flashed this TWRP, then installed AOSP 11, v313 of this GSI: https://github.com/phhusson/treble_experimentations/releases/tag/v313
Things seem good, except:
the battery seems to drain a little quickly
no IR blaster (ZaZa remote does not recognize it)
TWRP cannot decrypt the phone's contents, so I cannot flash gapps.
Is TWRP not able to decrypt because I'm using Android 11 and the TWRP was built for 10?
@karoooo
Sorry for not responding to you, for some reason email notifications from XDA were stopped. Please tell me if you still need patched kernel, I will try to patch it explain you the technique.
zxczxc4 said:
Thanks for this!
I flashed this TWRP, then installed AOSP 11, v313 of this GSI: https://github.com/phhusson/treble_experimentations/releases/tag/v313
Things seem good, except:
the battery seems to drain a little quickly
no IR blaster (ZaZa remote does not recognize it)
TWRP cannot decrypt the phone's contents, so I cannot flash gapps.
Is TWRP not able to decrypt because I'm using Android 11 and the TWRP was built for 10?
Click to expand...
Click to collapse
Actually, data decryption on MTK SoCs is very painful thing. I'm still waiting for stable release of Android 11 from Unihertz, but they are in no hurry...
I know that beta 11 available. Unfortunately, I was not able to update using the official way. The bootloader was locked and the moment of updating, but probably the reason is that it was unlocked before (it possible to relock bootloader using SP Flash Tool). But I manager to fetch zip update package and install it via TWRP After that I even managed to make package for SP Flash Tool based on this package, so I can to flash pure FW without updating and have locked bootloader!
UPD. I see that Unihertz have published Android 11 SW package for SP Flash Tool on their Google Drive! Soon I will try to make recovery based on this package.
@Meetoul
Thank you for your response.
Yes, yes, yes!
I want to know your technique.
Best Regards.
HI.
Summary: FRONT CAMERA not working after Bootloader Unlock
I am using Jelly2_JP (on latest Android 10) and I was wondering,
has anyone has experinced the Front Camera not working after Bootloader Unlock, and possibly the three " --disable-verification --disable-verity" commands?
The stock camera app won't recognize the front camera (not front/back switch button where there should be one), and other apps cant use the front camera either.
I can confirm that the front camera worked before unlocking the bootloader.
Reflashing stock image using SP Flash Tool and relocking Bootlader did not fix the issue.
Is anyone else experiencing the same issue?
karoooo said:
@Meetoul
Thank you for your response.
Yes, yes, yes!
I want to know your technique.
Best Regards.
Click to expand...
Click to collapse
Since Unihertz has released Android 11, I think that there is no sense to work on patching the old kernel.
Btw, now I'm working on TWRP based on Android 11 binaries from the latest FW, but no luck so far, it seems that kernel doesn't even start to boot...
@Meetoul
I wanted to learn your technique so that I could work on my own when Android 11 was released.
If Android 11 is formidable, prioritize working with Android 11.
Unfortunately, Android 11 for Jelly2_JP has not been released yet.
@kendzhi
I unlocked the bootloader with Jelly2_JP, but the front camera is still working.
@karoooo
Thank you for the reply!
May I ask, was your Jelly2_JP shipped before the latest Andorid 10 update (2021051912_g55v71c2k_dfl_jp_felica), meaning did your phone come with the previous Firmware (2020101915_g55v71c2k_dfl_jp_felica)?
I have two Jelly2_JP from Japan which came preshipped with the latest andorid Andorid 10 update (there was no need for OTA update). And in both phones, upon executing "fastboot flashing unlock" (without disableling AVB & without Rooting), the the front camera stopped working (not recognized by the system).
I even went into the Debug/Diagnostic? mode that was in Chinese (Booting by Vol down + Connecting to PC via USB), and peformed a hardware test for the Front Camera and the test froze the phone.
So I'm suspecting that Jelly2_JP that was shipped to Japan with the latest Firmware has some issues with Bootloader Unlocking breaking the Front Cam...

Categories

Resources