Yoga Tab 2 Kernel Compilation - Thinkpad Tablet General

Has anyone else made any serious attempts at compiling a kernel? Prompted by doctorow's thread about the wakelock issue, I got interested in compiling a kernel so it could actually be fixed. For anyone who's tried at all, there are obviously some missing files in Lenovo's release.
I tried copying over the missing files from ASUS's Zenfone kernel release (since it uses the same SoC and their kernel had all the files that make was complaining about). Between that and commenting out some references to a nonexistent tablet_config.h header, it managed to at least finish compiling. Unfortunately I don't have a bootloader-unlocked device to test on yet, so I'm not terribly confident that it actually works.
P.S.: I'm not really sure if this belongs in the dev section or not? Sorry if it's in the wrong place, but I can't start threads there anyway at my current post count.

iampanis said:
I tried copying over the missing files from ASUS's Zenfone kernel release (since it uses the same SoC and their kernel had all the files that make was complaining about). Between that and commenting out some references to a nonexistent tablet_config.h header, it managed to at least finish compiling. Unfortunately I don't have a bootloader-unlocked device to test on yet, so I'm not terribly confident that it actually works.
Click to expand...
Click to collapse
Interesting, I haven't even gotten that far when I tried to compile them. The sources are most likely not up to date or even representative of the actual firmware kernel. For example, when I looked at the battery driver, I noticed in the published sources, the polling interval was hard-coded in such a way that it would completely ignore the setting of the poll_interval kernel parameter. But we know that this is not true for the actual firmware which is in fact respecting the setting of said parameter.

@Grarak and me have managed to get the messy "source code" of Lenovo to build. I have additionally added some security patches and stripped some kernel modules. Since we don't want to violate the GPL like Lenovo, we have pushed the kernel to GitHub.
Bear in mind that there may be some issues, given the kernel is a work in progress. It boots on stock as well as on cm-12.1, though.

Olivier said:
@Grarak and me have managed to get the messy "source code" of Lenovo to build. I have additionally added some security patches and stripped some kernel modules. Since we don't want to violate the GPL like Lenovo, we have pushed the kernel to GitHub.
Bear in mind that there may be some issues, given the kernel is a work in progress. It boots on stock as well as on cm-12.1, though.
Click to expand...
Click to collapse
Same kernel works for both 830f and 1050f?
Could you please post a compiled kernel? (which I assume can be flashed simply via fastboot)
Thanks!

raenye said:
Same kernel works for both 830f and 1050f?
Could you please post a compiled kernel? (which I assume can be flashed simply via fastboot)
Thanks!
Click to expand...
Click to collapse
Sure, here you go: kernel-yt2-20160327.img. I think it will boot on 1050F.

Olivier said:
Sure, here you go: kernel-yt2-20160327.img. I think it will boot on 1050F.
Click to expand...
Click to collapse
Hello, I have a 1050F too is somebody tried this kernel on 1050F? Is it possible to support wake gesture kernel extensions with this kernel?

Olivier said:
Sure, here you go: kernel-yt2-20160327.img. I think it will boot on 1050F.
Click to expand...
Click to collapse
I was able to unlock bootloader, install TWRP and flash this kernel via fastboot on both 830F and 1050F.
It works fine (and the battery life seems better since there's no wakelock bug).
Thanks!
Looking forward to alpha-grade CM....

raenye said:
I was able to unlock bootloader, install TWRP and flash this kernel via fastboot on both 830F and 1050F.
It works fine (and the battery life seems better since there's no wakelock bug).
Thanks!
Looking forward to alpha-grade CM....
Click to expand...
Click to collapse
Did you use.
Fastboot Flash recovery recoveryname.img.
or
Fastboot flash boot bootname.img
To send it to the tablet.

corasman said:
Did you use.
Fastboot Flash recovery recoveryname.img.
or
Fastboot flash boot bootname.img
To send it to the tablet.
Click to expand...
Click to collapse
The kernel goes to the boot partition. So 2nd option.

raenye said:
The kernel goes to the boot partition. So 2nd option.
Click to expand...
Click to collapse
Thanks ,I'll give it a try.
O.K tried this
I put the file in to my ADB folder
from a command prompt I typed Fastboot flash boot c:/adb/kernel-yt2-20160327.img and it returned
FAILED (remote: unknown command) any suggestion please.

corasman said:
Thanks ,I'll give it a try.
O.K tried this
I put the file in to my ADB folder
from a command prompt I typed Fastboot flash boot c:/adb/kernel-yt2-20160327.img and it returned
FAILED (remote: unknown command) any suggestion please.
Click to expand...
Click to collapse
Using windows? paths are c:\directory\file and not c:/directory/file
I used the fastboot executable from the tethered recovery package.
Checklist:
Did you unlock bootloader? it won't boot otherwise.
Did you backup current boot partition from TWRP/CWM?
Did you boot the tablet in fastboot mode? (down+pwr)
Can fastboot detect your tablet? (fastboot devices)

raenye said:
Using windows? paths are c:\directory\file and not c:/directory/file
I used the fastboot executable from the tethered recovery package.
Checklist:
Did you unlock bootloader? it won't boot otherwise.
Did you backup current boot partition from TWRP/CWM?
Did you boot the tablet in fastboot mode? (down+pwr)
Can fastboot detect your tablet? (fastboot devices)
Click to expand...
Click to collapse
Yes to all.
I wondered if the command slashes were the right way / or \ the way I used is what I used to unlock the bootloader and install TWRP.
I have tried the slashes the other way and get the same result, as in \ .

raenye said:
I was able to unlock bootloader, install TWRP and flash this kernel via fastboot on both 830F and 1050F.
It works fine (and the battery life seems better since there's no wakelock bug).
Thanks!
Click to expand...
Click to collapse
Hmm, I'm getting a high battery_wake_lock (on the April OTA firmware) -- even when running this kernel!
Any idea how can this be?

Hi,
I was trying to play a little bit with kernel provided by @Olivier and @Grarak ...
1. Binary Image kernel-yt2-20160327.img boots up fine on 1050l, but LTE is not working. Rest seems to be fine...
2. In next steps I replaced initrd.img with a little modified stock one - and LTE started to work - I removed from initrd almost all modules leaving only bcm43241.ko.
3. Battery wakelock problem seems not be resolved - brief check at bq27x00_battery.c in repository shows that wake_lock is still set under bq27x00_battery_suspend_resume()
... so I trying to fix this battery driver but I have problem with kernel - I can compile it successfully, but it doesn't boot
@Olivier:
1. Which branch was used to build kernel-yt2-20160327.img?
2. Which config did you use ?
My procedure using android-ndk-r12b toolchain:
# git clone ...github.com/lenovo-yt2-dev/android_kernel_lenovo_baytrail
# export PATH=~/android_yoga/toolchain/bin:$PATH
# export CROSS_COMPILE=x86_64-linux-android-
# export ARCH=x86
# make cyanogenmod_YT2_10_defconfig --- if this right config?
# make -j8 ----- lot's of warninigs, but kernel is compiled sucesfully.
# abootimg --create boot_test5.img -f bootimg.cfg -k bzImage -r initrd.img ---- bzImage from arch/x86/boot
> fastboot.exe flash boot boot_test5.img
... kernel stuck somewhere, it's doesn't even come to Zygote phase (lenovo animation). Is there any way to see kernel boot messages ?

Hi
I would also like to experiment with the Kernel, but I need to unlock the bootloader. unfortunately the thread is deleted files and I can not, can anyone help me even for private?
I have a 1380F in KitKat
Kind regards

airmalaga said:
Hi
I would also like to experiment with the Kernel, but I need to unlock the bootloader. unfortunately the thread is deleted files and I can not, can anyone help me even for private?
I have a 1380F in KitKat
Kind regards
Click to expand...
Click to collapse
I used this procedure: mobility.forumsee.com/a/m/s/p12-9574-0973888--yoga-tab-unlocking-daaa-deee-daaa-dooo.html
Patched ESP file I found on another forum: forum.android.com.pl/topic/259763-odblokowanie-bootloader%C3%B3w-yoga-tab-2/#entry4598175
For me it worked on Lolipop, but I as know bootloader changed arch x32->x64 during Lolipop->KK upgrade... I don't know if this esp will work on KK (at least do backup of ESP and boot partitions before).
---------- Post added at 12:07 PM ---------- Previous post was at 11:52 AM ----------
BTW: I was able finally to compile and startup my modified kernel using CM building engine from this thread .
I removed all wakelock code from bq27x00_battery_x8.c
For 1050L I merged: kernel from @Olivier repository + my patch on bq27x00_battery_x8.c + my initrd based on stock + stock Lolipop.
First tests seems to be very promising:
- finally NO battery_wakelock in Wakelock Detector
- LTE is working
- GPS is working
- Sound system is working
- No crashed till now
If anybody is interested i can attach img file.

Thx :good:
jasfasola said:
I used this procedure: mobility.forumsee.com/a/m/s/p12-9574-0973888--yoga-tab-unlocking-daaa-deee-daaa-dooo.html
Patched ESP file I found on another forum: forum.android.com.pl/topic/259763-odblokowanie-bootloader%C3%B3w-yoga-tab-2/#entry4598175
For me it worked on Lolipop, but I as know bootloader changed arch x32->x64 during Lolipop->KK upgrade... I don't know if this esp will work on KK (at least do backup of ESP and boot partitions before).
---------- Post added at 12:07 PM ---------- Previous post was at 11:52 AM ----------
BTW: I was able finally to compile and startup my modified kernel using CM building engine from this thread .
I removed all wakelock code from bq27x00_battery_x8.c
For 1050L I merged: kernel from @Olivier repository + my patch on bq27x00_battery_x8.c + my initrd based on stock + stock Lolipop.
First tests seems to be very promising:
- finally NO battery_wakelock in Wakelock Detector
- LTE is working
- GPS is working
- Sound system is working
- No crashed till now
If anybody is interested i can attach img file.
Click to expand...
Click to collapse

jasfasola said:
I removed all wakelock code from bq27x00_battery_x8.c
For 1050L I merged: kernel from @Olivier repository + my patch on bq27x00_battery_x8.c + my initrd based on stock + stock Lolipop.
Click to expand...
Click to collapse
Cool, could you push your patch to GitHub?
jasfasola said:
First tests seems to be very promising:
- finally NO battery_wakelock in Wakelock Detector
- LTE is working
- GPS is working
- Sound system is working
- No crashed till now
Click to expand...
Click to collapse
The kernel should be working, but the ALS is broken (seems to be a sensor from Avago) - you'll notice that if you use automatic brightness.

Olivier said:
The kernel should be working, but the ALS is broken (seems to be a sensor from Avago) - you'll notice that if you use automatic brightness.
Click to expand...
Click to collapse
Fixed. That was quite easy. Driver al3320 was in place. The problem was permissions set by script init.byt_t_ffrd8.rc in initrd. By default it's root/root, but it should be system/system. I already corrected paths and checked it - it's working. If you could give me permission to repo I can push the patch.
BTW: I see lot's of things are being hard-coded into initrd scripts. Since we changed config kernel, all those scripts must be checked. I can try to do it in free time...but some things are platform depended so, another original initrd from lolopop on 830f would be nice to compare...

jasfasola said:
so, another original initrd from lolopop on 830f would be nice to compare...
Click to expand...
Click to collapse
What do you need exactly? @jasfasola

Related

[KERNEL][OC] custom kernel for Motoroi rom + Dexter's rom

News:
fjfalcon has compiled kernel for Milestone XT720 roms.
Kernel booting instruction:
Here are the steps needed to boot custom boot.img(kernel). It is safe to do this way it will only boot the boot.img and not flash it.
Code:
adb reboot bootloader
Code:
fastboot boot boot.img
If your phone's rom is based on Dexter's rom download fjfalcon_xt720_boot.7z attachment
WARNING DO NOT FLASH THIS BOOT.IMG IN ANY WAY. THIS VERSION IS CONFIRMED TO WORK ON DEXTER'S ROM.
Changes:
Enabled swap
enabled ext2
enabled ext2
enabled ext4
If your phone's rom is based on Motoroi 2.2 rom download raser_motoroi_boot.7z attachment
WARNING DO NOT FLASH THIS KERNEL IN ANY WAY. THIS VERSION IS CONFIRMED TO WORK ON STKT_N_79.33.50R.
Changes:
Overclocked to 1GHz(stock voltage)
ThumbEE
GCC 4.4.3
Added ext3
Added ext4
cpu governer enabled: powersave conservative
Thanks:
fjfalcon
XVilka
yakk
Skrilax_CZ
Mioze7Ae
to be continued...
reserved...
is there any good howto how to create boot.img?
fjfalcon said:
is there any good howto how to create boot.img?
Click to expand...
Click to collapse
check this
http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
1. download kernel sources from motorola
2. check _READ.txt in downloaded sources
if you'll further have questions please ask
Mine first boot.img
Powersave governor
ext2
ext3
ext4
swap
This is my first attemp of 2.6.29.
So, Resar, where can i get fastboot for linux?
Already founded...
Like always make fastboot in copy of android git comes with answer =)
Damn =(
Don't booted.
So, i get zImage from /home/fjfalcon/mydroid/out/target/pr/generic/obj/PARTITIONS/kernel_intermediates/build/arch/arm/boot
and tryed to mkbootimg with ramdisk from Dexter 1.3(that pulled by cat /dev/mtd/mtd4 > mtd.img) and splited by perl splitter.
Damn =(
fjfalcon said:
Powersave governor
ext2
ext3
ext4
swap
This is my first attemp of 2.6.29.
So, Resar, where can i get fastboot for linux?
Already founded...
Like always make fastboot in copy of android git comes with answer =)
Damn =(
Don't booted.
So, i get zImage from /home/fjfalcon/mydroid/out/target/pr/generic/obj/PARTITIONS/kernel_intermediates/build/arch/arm/boot
and tryed to mkbootimg with ramdisk from Dexter 1.3(that pulled by cat /dev/mtd/mtd4 > mtd.img) and splited by perl splitter.
Damn =(
Click to expand...
Click to collapse
Congrats, Nice done Your kernel boots fine on motoroi 2.2.1 rom (it boots to android then after 1 minute reboots. It seems ramdisk problem). You should try to build from milestone xt720 sources, But as I remember there is something broken in that sources
Additionally you can overclock the cpu by changing values S600M, S550M, S500M, S250M, S125M in arch/arm/mach-omap2/omap3-opp.h
So, what can we do with ramdisk to make it work normaly?
The problem is the kernel not the ramdisk. You have made a boot.img from motoroi kernel zImage and the ramdisk of Dexter's rom which is based on Milestone xt720 rom. We can try to compile kernel from Milestone xt720 sources. If it won't boot then We'll have to make some changes in kernel sources. But right now I don't know what changes should be done.
Now I'm trying to patch kernel to 2.6.38 version.
Thanks, but how do i know it wrok?
just do
Code:
adb reboot bootloader
then wait till the phone reboots to bootloader
Code:
fastboot boot boot.img
now it will show the M logo for about 20 seconds after that animation starts.
Run SetCPU application, go to Info and under Kernel you'll find info about running kernel, and also I have made an overclocked version kernel and will update the first post as sooon as possible.
You must run motoroi 2.2 rom to boot my kernel, it doesn't work on Dexter's 2.2 rom.
Ok, now will try to compile kernel from 2.1 source.
Thank you, resar.
fjfalcon said:
Ok, now will try to compile kernel from 2.1 source.
Thank you, resar.
Click to expand...
Click to collapse
How is going your work. have you compiled ms xt720 kernel?
Yesterday stoped on kernel error.
Today when i will go to home... that about 5 or 6 gmt will try to fix it.
Just booted with my kernel!!!! =)
Omg, IT REALLY WORKS! =)
Enabled swap... enabled ext2, ext3, ext4...
Mine new Kernel on 2.6.29 from 2.1 source
Works with Dexter's 1.3!!!
Wow =)
Already works fine about 20 min's.
It's very good news! =)
Is there anyway to always boot fastboot with my kernel when phone loading?
fjfalcon said:
Just booted with my kernel!!!! =)
Omg, IT REALLY WORKS! =)
Enabled swap... enabled ext2, ext3, ext4...
Mine new Kernel on 2.6.29 from 2.1 source
Works with Dexter's 1.3!!!
Wow =)
Already works fine about 20 min's.
It's very good news! =)
Is there anyway to always boot fastboot with my kernel when phone loading?
Click to expand...
Click to collapse
thats great news, congrats next step is the patching of kernel to upper versions))
so why cant we flash these boot images if they boot?
easye420 said:
so why cant we flash these boot images if they boot?
Click to expand...
Click to collapse
The boot.img are not signed with Motorola's bootloader signing key. If you flash it, the bootloader signature validation will fail. Under a normal boot if the signature validation fails, the bootloader will refuse to load boot.img and will instead drop you into Motorola recovery. fastboot bypasses the Motorola signature check, but it requires loading boot.img from USB.
stupid motorola has to ruin everything.
fjfalcon said:
Is there anyway to always boot fastboot with my kernel when phone loading?
Click to expand...
Click to collapse
It seems that there is no way to do that. The only thing you can do is automatically boot to fastboot. But then you'll need a PC to boot boot.img from from fastboot.

[GT-I9070][Kernel][GINGERBREAD] Stock Kernel + TWRP Recovery for Galaxy S Advance

This kernel will provide you the standard stock kernel and also includes TWRP recovery.​
( disclaimer )
I AM NOT TO BE HELD RESPONSIBLE IF YOU DAMAGE YOUR PHONE
Using Odin to flash this kernel WILL increase your binary counter.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
( features )
- Team Win Recovery Project 2.2.1
- CIFS Support
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
( how to install using Odin )
1. Restart into download mode by pressing Power + Home + Vol Down
2. Start Odin, and flash the attached kernel as PDA.
Remember to extract the attached file only once. if you end up with a kernel.bin.md5 you extracted twice!
Do not use the PIT, do not have any options checked except for "Auto reboot" and "F. Reset Time"
3. Wait for the device to reboot
( how to install using DD )
This method does not increase your binary counter, but your phone needs to be rooted so you can perform this!
IF YOU'RE NOT FAMILIAR WITH DD I RECOMMEND YOU TO AVOID THIS METHOD
1. Extract the attached file twice. You will end up with a kernel.bin.md5 file
2. Put the kernel.bin.md5 file to /sdcard
3. Start adb shell
4. Do the following commands:
Code:
$ su
# dd if=/sdcard/kernel.bin.md5 of=/dev/block/mmcblk0p15
# reboot
5. Wait for the device to reboot.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
( special thanks )
- Team Win for creating this awesome custom recovery.
- @Chris41g for starting the TWRP port.
- @hackbob for helping with the kernel issues.
( donations )
if you think that think that the work I put in this kernel is donation worthy,
then click the following link and buy me a beer/coffee/etc...
Donate via Paypal :good:
Enjoy! and don't forget to hit the thanks button
if you find any issues with this kernel, please report!
reserved.
Can you give me just compiled zImage i.e kernel image ASAP?
varun.chitre15 said:
Can you give me just compiled zImage i.e kernel image ASAP?
Click to expand...
Click to collapse
You can download the package and extract the kernel.bin.md5.
While building it's generated as zImage and after renamed to kernel.bin and md5ed for Odin
Well actually, that is not what I need because kernel.bin.md5 contains initramfs which is known as ramdisk usually. But I only need kernel i.e zImage which I am planning to repack to boot.img
Correct me if I am wrong
varun.chitre15 said:
Well actually, that is not what I need because kernel.bin.md5 contains initramfs which is known as ramdisk usually. But I only need kernel i.e zImage which I am planning to repack to boot.img
Correct me if I am wrong
Click to expand...
Click to collapse
Yep you are right, sorry for the misunderstanding.
I can build it (from Github) for you without the ramdisk but I'm not sure it will work correctly without the driver added from the ramdisk to the kernel image during the build.
---------- Post added at 05:27 PM ---------- Previous post was at 05:22 PM ----------
Just to be sure...
I'm trying to compile cm7 and the intrafms are added with the kernel while building the boot.img, because in the intrafms that we are adding to kernel image we are basically adding the modules for wifi,bt, etc...
You sure you don't need them?
hackbob said:
Yep you are right, sorry for the misunderstanding.
I can build it (from Github) for you without the ramdisk but I'm not sure it will work correctly without the driver added from the ramdisk to the kernel image during the build.
Click to expand...
Click to collapse
Ok can you do that, test it and report back ASAP?
This is needed before I release my ROM
btw I think we should move on to main DEV thread
Post your next reply over there
@varun.chitre15
you can try to build it from source...
the source code is available on github: https://github.com/diego-ch/android_kernel_samsung_janice
hackbob said:
[/COLOR]Just to be sure...
I'm trying to compile cm7 and the intrafms are added with the kernel while building the boot.img, because in the intrafms that we are adding to kernel image we are basically adding the modules for wifi,bt, etc...
You sure you don't need them?
Click to expand...
Click to collapse
Oh great!
Can you get me the boot.img compiled while building
I will take what all I need from it
---------- Post added at 09:01 PM ---------- Previous post was at 09:00 PM ----------
diego-ch said:
@varun.chitre15
you can try to build it from source...
the source code is available on github: https://github.com/diego-ch/android_kernel_samsung_janice
Click to expand...
Click to collapse
Well actually I am trying to avoid that because I have no experience in kernel development
Can i extract it from the rom? I got boot.img and recovery.img, is that you need?
Sent from my GT-I9070 using Tapatalk 2
Exactly!
Attach the boot.img
varun.chitre15 said:
Exactly!
Attach the boot.img
Click to expand...
Click to collapse
i sent you a pm
Hi,
I just flashed this using Odin and i cant see my sd card in TWRP so i cant flash any roms and also the device wont root using SuperOneClick it hangs on shell root #7 Waiting for device...
Would it be possible to create a kernel with recovery for Advance with NFC chip?
xCode195 said:
Hi,
I just flashed this using Odin and i cant see my sd card in TWRP so i cant flash any roms and also the device wont root using SuperOneClick it hangs on shell root #7 Waiting for device...
Click to expand...
Click to collapse
Have you setup USB drivers of your phone?
Waiting for device indicates, Superone click is unable to contact your phone.
Am I the only one with TWRP restore not Working properly?
Backedup the default partition (system, data and another that I don't remember), Restored, everything seems fine (no error on twrp) but after a reboot the phone goes into bootloop.
varun.chitre15 said:
Have you setup USB drivers of your phone?
Waiting for device indicates, Superone click is unable to contact your phone.
Click to expand...
Click to collapse
Yep I tried installing them again and it got stuck on the same step but now i also get Hardware ID Failed popup when I connect the device..
Should I reflash the kernel or do something else?
Iv backuped and restored a few times and its ok
Sent from my GT-I9070 using Tapatalk 2
hackbob said:
Am I the only one with TWRP restore not Working properly?
Backedup the default partition (system, data and another that I don't remember), Restored, everything seems fine (no error on twrp) but after a reboot the phone goes into bootloop.
Click to expand...
Click to collapse
I was testing antonio's rom yesterday and before that I made a full backup.
today I restored my backup and everything was fine.
get me a logcat, a dmesg log and also a recovery.log so I can take a look on whats wrong.
xCode195 said:
Hi,
I just flashed this using Odin and i cant see my sd card in TWRP so i cant flash any roms and also the device wont root using SuperOneClick it hangs on shell root #7 Waiting for device...
Click to expand...
Click to collapse
you can also use CWM Flasheable SuperSu from Chainfire instead of supéroneclick
do you have an external sdcard? it wont work with internal memory.
diego-ch said:
you can also use CWM Flasheable SuperSu from Chainfire instead of supéroneclick
do you have an external sdcard? it wont work with internal memory.
Click to expand...
Click to collapse
I would try that if I could get TWRP to read my sdcard,it says its browsing the sdcard but none of my files or folders are there and its just empty.When i reboot into the system everything is there but not in TWRP...

[Q] Enable ADB / USB Debugging with a broken screen

Any kernel developer can help me with this?
I have broken my lcd of my s5 and no usb debugging enabled.
So i read this here
i suggest you contact a kernel developer to automatically enable it in the default.prop and sideload the kernel in recovery!
Click to expand...
Click to collapse
brunocssoares said:
Any kernel developer can help me with this?
I have broken my lcd of my s5 and no usb debugging enabled.
So i read this here
Click to expand...
Click to collapse
I'm a kernel developer but still new here on samsung so I can't compile a kernel for s5 yet but I can explain to you the process and maybe you have the knowledge I still don't have.
1. Get any custom kernel that's compatible to your s5.
2. Extract the ramdisk from the kernel.
3. Unpack the ramdisk and edit the rc file that's responsible for enabling adb(I think it's init.rc).
4. Repack the ramdisk.
5. Make a new boot image using the modified ramdisk and the zImage you got awhile ago when you extract the ramdisk.
6. Flash the resulting boot.img using fastboot by typing "fastboot boot <boot.img file>"
Please not that the fastboot command doesn't permanently flash the kernel and will revert back to the previous kernel after reboot.
On a second thought... I'm not sure but you can try flashing one of the recoveries here or a AOSP kernel. Most of them have USB Debugging enabled by default. At least that's true base on my past devices.
Thank you for the answer!
But unfortunately i don't know how to do this things. So, I will study a little about this and if I get a solution i will post here!
Try hard always!
One more thing: Can I use other cellphone's tutorial to do this? Like this : http://forum.xda-developers.com/showthread.php?t=1262656
sorry for my horrible english!

LineageOS 7.1 for SGP771

Hi. As a result of Androplus stoppage of his kernel support I decided to create this theme. I'm not a developer.
I use LineageOS more than two months, and it's stable. Originally it was built by andralex, he didn't create this threat as he was waiting the permission from other developer whose groundwork he used. But I lost contact with him. Seems he is very busy.
Now the other developer builded the rom, his nickname is kv123.
--------------
To get usb otg working use this in terminal when you inserted usb stick
Code:
su
echo 1 > /sys/module/qpnp_smbcharger_extension/parameters/start_id_polling
------------
After any lineageos update dont forget about play store to give permissions for storage. Otherwise it wont download any apps larger the 20 mb.
Lineage camera is a bit buggy, so it's better to use open camera.
---------
There are the links
[STRIKE]https://www.androidfilehost.com/?fid=745425885120730219[/STRIKE]
https://yadi.sk/d/Zfxi3agx3HkLQL
Some developer links:
https://review.lineageos.org/#/q/project:LineageOS/android_kernel_sony_msm8994
https://github.com/LineageOS/android_kernel_sony_msm8994
If you want I can ask kv123 to build the rom for sgp712 too.
------------
Some screenshots:
Oh. You need also replace wifi calibration file here: /system/etc/firmware/wlan/bcmdhd/bcmdhd.cal and reboot
It's forgotten to be added.
Updated fixed version at yandex disk.
Thanks for this. It is exactly what I am looking for and I hope my tech skills are up to the task.
BTW, this link comes up "404 not found. Can't find it!"
https://www.androidfilehost.com/?fid=745425885120730219
Would you have another we can try?
Thats because kv123 removed version with wifi buggy.
Use my mirror link or this.
https://www.androidfilehost.com/?fid=817550096634767960
alex009988 said:
Hi. As a result of Androplus stoppage of his kernel support I decided to create this theme. I'm not a developer.
I use LineageOS more than two months, and it's stable. Originally it was built by andralex, he didn't create this threat as he was waiting the permission from other developer whose groundwork he used. But I lost contact with him. Seems he is very busy.
Now the other developer builded the rom, his nickname is kv123.
--------------
To get usb otg working use this in terminal when you inserted usb stick
------------
After any lineageos update dont forget about play store to give permissions for storage. Otherwise it wont download any apps larger the 20 mb.
Lineage camera is a bit buggy, so it's better to use open camera.
---------
There are the links
https://www.androidfilehost.com/?fid=745425885120730219
https://yadi.sk/d/Zfxi3agx3HkLQL
Some developer links:
https://review.lineageos.org/#/q/project:LineageOS/android_kernel_sony_msm8994
https://github.com/LineageOS/android_kernel_sony_msm8994
If you want I can ask kv123 to build the rom for sgp712 too.
Click to expand...
Click to collapse
Hi, could you please add some screenshots?
Ok. Added to the top.
need rom for SG712 please...
Thanks for sharing. SGP712 build would be great
Charsher47 said:
Thanks for sharing. SGP712 build would be great
Click to expand...
Click to collapse
Kv123 told me that he's gonna build the rom for 712 too.
I don't have SPG712, so i cannot test it. I was lazy to download firmware for 712, so libs are from 771. Hope they are the same. Who have please leave some feedback.
SGP712_lineageos_14_1
P.S. Nfc may not work. I will need to do some tests.
kv123 said:
I don't have SPG712, so i cannot test it. I was lazy to download firmware for 712, so libs are from 771. Hope they are the same. Who have please leave some feedback.
SGP712_lineageos_14_1
P.S. Nfc may not work. I will need to do some tests.
Click to expand...
Click to collapse
I flashed the rom with Androplus' TWRP-3.0.2-0-20160604, Error 7 because target device is karin_windy but the recovery says the device is karin (actually SGP712, it's karin_windy).
So i deleted the device verification in the updater-script, and it's Error 6 now...
Phil_Libra said:
I flashed the rom with Androplus' TWRP-3.0.2-0-20160604, Error 7 because target device is karin_windy but the recovery says the device is karin (actually SGP712, it's karin_windy).
So i deleted the device verification in the updater-script, and it's Error 6 now...
Click to expand...
Click to collapse
Why do you use androplus recovery? Use normal recovery, take it from yandex disk. And boot by vol- and power till it vibrates.
alex009988 said:
Why do you use androplus recovery? Use normal recovery, take it from yandex disk. And boot by vol- and power till it vibrates.
Click to expand...
Click to collapse
Nothing happens after I flashed the recoveries from yandex disk(both 3.0.3 and 3.1), so I tried androplus recovery...
Is there a modified boot.img for those recoveries?
P.S. I flashed 32.3.A.2.33.ftf first.
---------- Post added at 10:29 AM ---------- Previous post was at 10:22 AM ----------
I flashed 32.3.A.2.33 with flashtool, then flash the recovery in fastboot mode with:
Code:
fastboot flash recovery [I]recovery name[/I]
then pressed vol- and power, nothing happens and the tablet boots to the system.
Maybe it's better: fastboot flash recovery twrp.img ?
This twrp only requires updated bootloader from 7.0 stock.
Also i need to keep these buttons pressed untill it vibrates that is 2-3 seconds.
You can find kv123 at this thread http://4pda.ru/forum/index.php?showtopic=706675
Also you can try to contact with andralex8. He has just 712 tablet. And it worked for him. But I'm not sure if he answers you quickly.
If you keep trouble with the recovery, try twrp from this https://forum.xda-developers.com/z4-tablet/general/guide-nougat-drm-fix-root-twrp-sgp771-t3555265
Phil_Libra said:
Nothing happens after I flashed the recoveries from yandex disk(both 3.0.3 and 3.1), so I tried androplus recovery...
Is there a modified boot.img for those recoveries?
P.S. I flashed 32.3.A.2.33.ftf first.
---------- Post added at 10:29 AM ---------- Previous post was at 10:22 AM ----------
I flashed 32.3.A.2.33 with flashtool, then flash the recovery in fastboot mode with:
Code:
fastboot flash recovery [I]recovery name[/I]
then pressed vol- and power, nothing happens and the tablet boots to the system.
Click to expand...
Click to collapse
Sorry if I have missed something obvious, but are you attempting to flash LineageOS? In which case I am confused as to why you are flashing the Sony Rom 32.A.2.33?
For my part I am gearing up to attempt the LineageOS install but would like to have a backup copy of the Sony firmware in case it goes wrong.
Assuming you installed an English version, which one did you select from here:-
https://xpericheck.com/device/SGP771
Indeed, if you try something especially unchecked, better to have a backup.
But you also need to have last sony rom(any of android 7.0) in order to update bootloader and have last twrp working.
alex009988 said:
Maybe it's better: fastboot flash recovery twrp.img ?
This twrp only requires updated bootloader from 7.0 stock.
Also i need to keep these buttons pressed untill it vibrates that is 2-3 seconds.
You can find kv123 at this thread http://4pda.ru/forum/index.php?showtopic=706675
Also you can try to contact with andralex8. He has just 712 tablet. And it worked for him. But I'm not sure if he answers you quickly.
If you keep trouble with the recovery, try twrp from this https://forum.xda-developers.com/z4-tablet/general/guide-nougat-drm-fix-root-twrp-sgp771-t3555265
Click to expand...
Click to collapse
Androplus‘ recovery need a modified boot.img so I wonder if the same as the recovery in yandex disk?
And recovery from https://forum.xda-developers.com/z4-tablet/general/guide-nougat-drm-fix-root-twrp-sgp771-t3555265 is the same as Androplus’ recovery.
Ok. If you've done everything right I guess 712 dosent work with 771 recovery. I'll tell about it to kv123 and you can say it on your own on 4pda.
Please anybody who has 712 model. Test 3.1 recovery from yandex disk and confirm or contradict if it dosent work for you.
Phil_Libra said:
Nothing happens after I flashed the recoveries from yandex disk(both 3.0.3 and 3.1), so I tried androplus recovery...
Is there a modified boot.img for those recoveries?
P.S. I flashed 32.3.A.2.33.ftf first.
---------- Post added at 10:29 AM ---------- Previous post was at 10:22 AM ----------
I flashed 32.3.A.2.33 with flashtool, then flash the recovery in fastboot mode with:
Code:
fastboot flash recovery [I]recovery name[/I]
then pressed vol- and power, nothing happens and the tablet boots to the system.
Click to expand...
Click to collapse
alex009988 said:
Please anybody who has 712 model. Test 3.1 recovery from yandex disk and confirm or contradict if it dosent work for you.
Click to expand...
Click to collapse
I'm seeing the same results. Tried the same recoveries to no avail.

TWRP and ROOT for Tab 4 8/10 (Plus) (TB-8704X/F/V,TB-X704L/F, TB-8504X/F, TB-X304L/F)

TWRP is an open source, community project. TWRP development is done by roughly 4 people at this point. We also have a large support community with many people who are willing to answer questions and help people with their devices either through our IRC channel or on forums like xda-developers.
Team Win was originally formed to work on porting WiMAX to CM7 for the HTC EVO 4G. After our work on the EVO 4G we wanted to work on a project that would work on more devices than just the EVO 4G and we settled on working on a recovery. Today TWRP is the leading custom recovery for Android phones.
A custom recovery is used for installing custom software on your device. This custom software can include smaller modifications like rooting your device or even replacing the firmware of the device with a completely custom "ROM" like OmniROM
Click to expand...
Click to collapse
WARNING!!! Be careful what you do here. One mistake and the device is soft-bricked. I take no responsibility for bricked devices, lost warranty or even OTAs not working!! Booting and/or flashing files from this post is on your own risk.
Requirements
Unlocked bootloader
Lenovo Tab 4 Plus with and without LTE and both 8 and 10 inch versions (TB-X704L/F, TB-8704X/F) are supported
Known Issues
WARNING! Our device uses dm-verity (verified boot). The system partition should remain read-only. Otherwise a bootloop will occur. You can flash SuperSU to resolve this but OTA's are no longer possible! You have to restore a factory image or clean system backup to receive OTAs
Download
TWRP for TB-8704X/F (8 inch plus): AndroidFileHost
TWRP for TB-8704V (8 inch plus Verizon): AndroidFileHost (provided by @3m1k)
TWRP for TB-X704L/F (10.1 inch plus): AndroidFileHost
TWRP for TB-8504X/F (8 inch): AndroidFileHost (touch input may only work after connecting mouse)
TWRP for TB-X304L/F (10.1 inch): AndroidFileHost
Instructions
Install fastboot and adb on your PC, e.g. from here
Enable developer options and in there select to unlock your bootloader by enabling OEM unlock and enable USB debugging
Connect your PC to your tablet and run
Code:
adb reboot bootloader
using adb on command line. The tablet will reboot into bootloader mode where you will only see the Lenovo logo. Now you use
Code:
fastboot oem unlock-go
to unlock. This will factory reset your device
Setup the tablet again and reboot again to the bootloader
Then run
Code:
fastboot boot twrp-3.2.3-0-<your-filename>.img
to temporarily boot into TWRP. You can also flash if you are sure
Select to keep system read only when TWRP starts to avoid modification which will make OTAs impossible
Backup at least system and boot partitions. Choose "System Image" for the system partition backup. Keep this backup for OTA updates.
Optionally flash SuperSU or Magisk in TWRP which should install system less. Keep OEM unlock enabled if you flash or modify anything
Writable System Partition
Some mods and root apps require write access to the system partition. By default the system partition is read-only to prevent any modification. Please note that if your system partition is modified in any way it needs to be restored to its original state before a system update (OTA) can be applied.
@dywersant has created a Magisk module here to achieve write access
@KreAch3R has updated the Magisk module to the latest version here
System Updates (OTA)
In order to successfully apply Lenovo system updates after root you have to restore the original boot, recovery (if you flashed TWRP) and system partitions from your current installed version (e.g. S000037) for your variant of the tablet. This will NOT delete your apps and data but will unroot. Note that OTAs are block based and always check the contents of most of the partitions. This means that all of these partitions (except your data) have to be original and have to be on the exact same version (e.g. S000037) for the update to succeed.
Credits
@wonderfulme - for testing the 8" version
@Teddy01 - for testing the 10" version
@3m1k - for providing the 8" Verizon version
TeamWin
Source
TWRP Manifest: https://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni/tree/twrp-7.1
Device Tree (TB-8704X): https://github.com/Matshias/twrp_android_device_tb_8704x/tree/android-7.1
Device Tree (TB-8704V): https://github.com/3m1k/twrp_android_device_tb_8704v
Device Tree (TB-X704L): https://github.com/Matshias/twrp_android_device_tb_x704l/tree/android-7.1
Device Tree (TB-8504X): https://github.com/Matshias/twrp_android_device_tb_8504x/tree/android-7.1
Device Tree (TB-X304L): https://github.com/Matshias/twrp_android_device_tb_x304l/tree/android-7.1
Changelog
v3:
Update to TWRP 3.2.3-0
v2:
Update to TWRP 3.2.1-0
v1:
Initial Release
TWRP for Tab 4 8/10 without "Plus"
I built TWRP for both devices and need testers. Here are experimental versions:
Tab 4 8 (TB-8504X/F): twrp-3.1.1-0-tb_8504x_testing1.img
Tab 4 10 (TB-x304L/F): no longer needed. Final version in first post
matshias said:
TWRP for Tab 4 8/10 without "Plus"
I built TWRP for both devices and need testers. Here are experimental versions:
Tab 4 8 (TB-8504X/F): twrp-3.1.1-0-tb_8504x_testing1.img
Tab 4 10 (TB-x304L/F): twrp-3.1.1-0-tb_x304l_testing1.img
Click to expand...
Click to collapse
I can test the 8 inch tomorrow. Thanks for building this btw.
---------- Post added at 02:01 PM ---------- Previous post was at 01:58 PM ----------
Wait, these builds are for the Plus variants only? They will not work with ZA2B0009US, correct? :\
w0rdie said:
Wait, these builds are for the Plus variants only? They will not work with ZA2B0009US, correct? :\
Click to expand...
Click to collapse
ZA2B0009US = TB-8504F so you can take the build for Tab 4 8 (TB-8504X/F) and hopefully it will work out of the box.
matshias said:
ZA2B0009US = TB-8504F so you can take the build for Tab 4 8 (TB-8504X/F) and hopefully it will work out of the box.
Click to expand...
Click to collapse
Just landed there myself. I'll give it a go tomorrow morning and update this post.
Thanks again.
I have tested on X304L work perfectly.
Only one thing when i'm on power via usb TWRP still turning off screen in 2min and seems that all operations are put in wait state until screen turned on again.
:good:
boza12 said:
I have tested on X304L work perfectly.
Only one thing when i'm on power via usb TWRP still turning off screen in 2min and seems that all operations are put in wait state until screen turned on again.
:good:
Click to expand...
Click to collapse
Thanks a lot for testing. I moved the TWRP to the first post.
In the TWRP settings you can switch off whether the screen goes off or not. Are you sure TWRP halts processing while the screen is off?
matshias said:
Thanks a lot for testing. I moved the TWRP to the first post.
In the TWRP settings you can switch off whether the screen goes off or not. Are you sure TWRP halts processing while the screen is off?
Click to expand...
Click to collapse
Yes It does - it happened to me last night also.
EggZenBeanz said:
Yes It does - it happened to me last night also.
Click to expand...
Click to collapse
Can you send me the logs (dmesg output and /tmp/recovery.log) after it happens?
Yes sure.
Is anyone able to make available a system image. I deleted my original back up after the update then messed the root up. I now getting setup app crash and can't get passed setup
EggZenBeanz said:
Yes sure.
Is anyone able to make available a system image. I deleted my original back up after the update then messed the root up. I now getting setup app crash and can't get passed setup
Click to expand...
Click to collapse
Download the factory image for your tablet from the Russian Lenovo forum (lenovo-forums.ru) . In there you will find a fragmented system image. You have to puzzle it together with a script according to XML file in the Image directory. If you wanna flash via fastboot you will have to convert it with img2simg to sparse format. You can also use dd command line TWRP with the raw image file. If you tell me your exact model number I can also upload what you need.
matshias said:
Download the factory image for your tablet from the Russian Lenovo forum (lenovo-forums.ru) . In there you will find a fragmented system image. You have to puzzle it together with a script according to XML file in the Image directory. If you wanna flash via fastboot you will have to convert it with img2simg to sparse format. You can also use dd command line TWRP with the raw image file. If you tell me your exact model number I can also upload what you need.
Click to expand...
Click to collapse
Thanks! That would be awesome if you could. I think I may brick it if I do what you suggest! My model is
TB-X704L/F (10.1 inch plus) could you include the boot image too?
EggZenBeanz said:
Thanks! That would be awesome if you could. I think I may brick it if I do what you suggest! My model is
TB-X704L/F (10.1 inch plus) could you include the boot image too?
Click to expand...
Click to collapse
Is it TB-X704L vor F? This is an important difference.
The boot image you can find as can be flashed in the factory image. You can start with this. When I have time I'll prepare the system image. Not sure when that is though.
matshias said:
Is it TB-X704L vor F? This is an important difference.
The boot image you can find as can be flashed in the factory image. You can start with this. When I have time I'll prepare the system image. Not sure when that is though.
Click to expand...
Click to collapse
Thanks!!!! Confirmed TB-X704F
matshias said:
TWRP for Tab 4 8/10 without "Plus"
I built TWRP for both devices and need testers. Here are experimental versions:
Tab 4 8 (TB-8504X/F): twrp-3.1.1-0-tb_8504x_testing1.img
Tab 4 10 (TB-x304L/F): twrp-3.1.1-0-tb_x304l_testing1.img
Click to expand...
Click to collapse
The twrp-3.1.1-0-tb_8504x_testing1.img flashes and boots fine but there is no touch input.
Logs: https://www.dropbox.com/s/vo2dvi4frpsf9hf/logs.zip?dl=0
(I connected a mouse via USB and got SU flashed)
On my Tab4 8 the touch is also not working with this image.
I think the following lines from dmesg.log are showing, that the touch driver ist not loading:
<4>[ 1.323216] [HXTP] Himax common touch panel driver init
<4>[ 1.323221] [HXTP][ERROR] himax_common_init failed, compare_tp_id = 1
w0rdie said:
The twrp-3.1.1-0-tb_8504x_testing1.img flashes and boots fine but there is no touch input.
Logs: https://www.dropbox.com/s/vo2dvi4frpsf9hf/logs.zip?dl=0
(I connected a mouse via USB and got SU flashed)
Click to expand...
Click to collapse
Do you have the TB-8504X or TB-8504F? Very strange that the touch driver won't load. if you have the F variant then maybe it has a slightly different hardware in which case I'll have to compile separate TWRP for this variant. Can you extract me your stock boot or recovery image and send it to me? I'd then build TWRP with the kernel from your tablet and we'll see what happens
EggZenBeanz said:
Thanks!!!! Confirmed TB-X704F
Click to expand...
Click to collapse
Here is the system image in sparse format for fastboot flashing: MEGA
matshias said:
Here is the system image in sparse format for fastboot flashing: MEGA
Click to expand...
Click to collapse
Amazing, thank you so much. All worked and back to normal. I'll root again with the screen off and provide logs
Sorry if this is off topic, but is there a way to convert the Chinese versions of the Tab 4 / Plus to the Global rom? I'm thinking of getting one from China when I'm there but the lack of Google Play support is a major deal breaker.

Categories

Resources