[Guide][SM-T500] Galaxy Tab A7 10.4 - Flash LineageOS or any other GSI rom. - Samsung Galaxy Tab A series Guides, News, & Discus

These are instructions to flash LineageOS 18.1 GSI builds on our SM-T500. The same instructions should work for any other GSI rom out there.
Some instructions here, like flashing an empty product.img and resizing system partition, are not necessary if you want to flash a rom that fits in system and bundles gapps with it.
Prerequisites:
* SM-T500 with BUJ1 FW
* Unlocked bootloader
* Verified Boot disabled
* TWRP installed
* fastboot and adb installed on your computer.
Step 1: boot to fastboot.
Boot in TWRP and press "reboot" -> "fastboot". Wait until the tablet reboots and, after a few seconds, check that you can see your device with
Code:
fastboot devices
Now flash product.img and system.img and resize system image to the entire available size of the super partition:
Code:
fastboot flash product product.img
fastboot erase system
fastboot flash system lineage-18.1-20211214-UNOFFICIAL-treble_arm64_bvS-vndklite.img
fastboot resize-logical-partition system 3940000000
fastboot reboot recovery
Step 2: back in recovery
We need to resize the logical system partition to take up all the space we asigned to it. That's only mandatory if you want to flash gapps later on. If your rom comes with gapps bundled you don't need to do this.
Code:
adb shell
mount /dev/block/bootdevice/by-name/system /system_root
umount /system_root
e2fsck -f /dev/block/bootdevice/by-name/system
resize2fs /dev/block/bootdevice/by-name/system 961915
Step 3: finish it
Now you need to go to "wipe" -> "format data" and confirm. After that you can flash gapps if you want. You must use MindTheGapps arm64 version.
If you choose to flash gapps you'll need to follow https://github.com/phhusson/treble_experimentations/wiki/Frequently-Asked-Questions-(FAQ)#how-to-bypass-certified-device-after-first-boot
Some stuff won't work out of the box (brightness, MTP, bluetooth or wired audio). Please see the next post to learn how to workaround these issues.

Known issues (and workarounds)
1. MTP doesn't work
You need to flash SM-T500-GSI-kernel.zip from TWRP. Do it only once unless you reverted back to stock boot.img.
2. The rom I've flashed (mostly PixelExperience) reboots after a few seconds/minutes
You need to flash SM-T500-GSI-kernel.zip from TWRP. Do it only once unless you reverted back to stock boot.img.
3. Brightness doesn't work
You need to flash SM-T500-GSI-brightness-fix.zip from TWRP. You need to repeat this again after flashing a new system.img with the same or different rom.
4. Audio doesn't work via bluetooth/jack headphones.
Follow the AUDIO FIX section of https://forum.xda-developers.com/t/...s-nairo-and-some-post-install-tweaks.4364963/, as suggested by @wesleyvanneck12345678
* kernel sources: https://github.com/pazos/android_kernel_samsung_gta4lwifi/

FAQ
Q: Which GSI variant should I choose?
A: arm64 ab. Use the vndklite variant if you want to flash gapps or fix the brightness.
Q: Do I need to format data after flashing a different ROM?
A: YES
Q: Do I need to format data after flashing a different version of the same ROM?
A: Most likely YES, but you can try without formatting and see if it boots.
Q: Do gapps survive rom changes (diffent versions of the same rom or different roms)?
A: NOPE. You need to flash them again.
Q: Do GSI roms work with Magisk?
A: They should if they're based on PHH builds and are up-to-date.
Q: How to bypass SafetyNet?
A: I don't know, I don't care.

Reserved

Thank you very much for this guide, this really opens things up for thre A7 as far as custom roms go. I do like the OneUI 3.1 on this tablet, however I find I don't use much of the OneUI specific features. An AOSP/Lineage build should be lighter on resources and storage.
I do have a question, when you do "fastboot flash product product.img", where exactly do you get the poroduct.img from? Is this somewhere in the stock firmware or do I find it elsewhere?
Thanks again!

Whoops, sorry. I forgot to attach it here. It is already attached in https://forum.xda-developers.com/t/...xy-tab-a7-10-4-sm-t500.4371123/#post-86050459, so you can pick it up from there if you're in a hurry. If not I will add it to OP.

All done! I'm now running the LineageOS 18.1 version you mentioned in the directions. So far so good, however after flashing both the brightness fix and the GSI kernel, I am still unable to control brightness and I do not have MTP. Just to clarify, I install both of these zips via the TWRP menu, correct?
One other thing that I've noticed is that the tablet does not sleep when closing the Samsung Book cover like it does in the stock OneUI. I wonder if a magisk or LSposed module could helo us out here?

paziusss said:
These are instructions to flash LineageOS 18.1 GSI builds on our SM-T500. The same instructions should work for any other GSI rom out there.
Some instructions here, like flashing an empty product.img and resizing system partition, are not necessary if you want to flash a rom that fits in system and bundles gapps with it.
Prerequisites:
* SM-T500 with BUJ1 FW
* Unlocked bootloader
* Verified Boot disabled
* TWRP installed
* fastboot and adb installed on your computer.
Step 1: boot to fastboot.
Boot in TWRP and press "reboot" -> "fastboot". Wait until the tablet reboots and, after a few seconds, check that you can see your device with
Code:
fastboot devices
Now flash product.img and system.img and resize system image to the entire available size of the super partition:
Code:
fastboot flash product product.img
fastboot erase system
fastboot flash system lineage-18.1-20211214-UNOFFICIAL-treble_arm64_bvS-vndklite.img
fastboot resize-logical-partition system 3940000000
fastboot reboot recovery
Step 2: back in recovery
We need to resize the logical system partition to take up all the space we asigned to it. That's only mandatory if you want to flash gapps later on. If your rom comes with gapps bundled you don't need to do this.
Code:
adb shell
mount /dev/block/dm-0 /system_root
umount /system_root
e2fsck -f /dev/block/dm-0
resize2fs /dev/block/dm-0 961915
Step 3: finish it
Now you need to go to "wipe" -> "format data" and confirm. After that you can flash gapps if you want. You must use MindTheGapps arm64 version.
If you choose to flash gapps you'll need to follow https://github.com/phhusson/treble_experimentations/wiki/Frequently-Asked-Questions-(FAQ)#how-to-bypass-certified-device-after-first-boot
Some stuff won't work out of the box (brightness, MTP, bluetooth or wired audio). Please see the next post to learn how to workaround these issues.
Click to expand...
Click to collapse
paziusss said:
These are instructions to flash LineageOS 18.1 GSI builds on our SM-T500. The same instructions should work for any other GSI rom out there.
Some instructions here, like flashing an empty product.img and resizing system partition, are not necessary if you want to flash a rom that fits in system and bundles gapps with it.
Prerequisites:
* SM-T500 with BUJ1 FW
* Unlocked bootloader
* Verified Boot disabled
* TWRP installed
* fastboot and adb installed on your computer.
Step 1: boot to fastboot.
Boot in TWRP and press "reboot" -> "fastboot". Wait until the tablet reboots and, after a few seconds, check that you can see your device with
Code:
fastboot devices
Now flash product.img and system.img and resize system image to the entire available size of the super partition:
Code:
fastboot flash product product.img
fastboot erase system
fastboot flash system lineage-18.1-20211214-UNOFFICIAL-treble_arm64_bvS-vndklite.img
fastboot resize-logical-partition system 3940000000
fastboot reboot recovery
Step 2: back in recovery
We need to resize the logical system partition to take up all the space we asigned to it. That's only mandatory if you want to flash gapps later on. If your rom comes with gapps bundled you don't need to do this.
Code:
adb shell
mount /dev/block/dm-0 /system_root
umount /system_root
e2fsck -f /dev/block/dm-0
resize2fs /dev/block/dm-0 961915
Step 3: finish it
Now you need to go to "wipe" -> "format data" and confirm. After that you can flash gapps if you want. You must use MindTheGapps arm64 version.
If you choose to flash gapps you'll need to follow https://github.com/phhusson/treble_experimentations/wiki/Frequently-Asked-Questions-(FAQ)#how-to-bypass-certified-device-after-first-boot
Some stuff won't work out of the box (brightness, MTP, bluetooth or wired audio). Please see the next post to learn how to workaround these issues.
Click to expand...
Click to collapse
I've tried this from both a Win11 and a Mint 20.2 box and get the same errors. The resize-logical-partition cmd unknown command and the fastboot reboot recovery says unknown target.

USE TWRP 3.6 from
[RECOVERY][UNOFFICIAL]TWRP 3.6.0 for 2020 Galaxy Tab A7 10.4[SM-T500]
/* * Disclaimer * * Your warranty is now void. * * We're not responsible for bricked devices, dead SD cards, * thermonuclear war, or you getting fired because the alarm app failed. Please * do some research if you have any concerns about features...
forum.xda-developers.com
You need a recent version of fastboot too. Get one

NeilR2 said:
All done! I'm now running the LineageOS 18.1 version you mentioned in the directions. So far so good, however after flashing both the brightness fix and the GSI kernel, I am still unable to control brightness and I do not have MTP. Just to clarify, I install both of these zips via the TWRP menu, correct?
One other thing that I've noticed is that the tablet does not sleep when closing the Samsung Book cover like it does in the stock OneUI. I wonder if a magisk or LSposed module could helo us out here?
Click to expand...
Click to collapse
MTP is disabled by default. You need to plug the tablet to your computer, go to the "slightly" hidden notification and select transfer files instead of the default "charge only".
Agree with the brightness thing. I will upload a new version when I have a minute. It should be placed in rw-system.sh, not in phh-on-boot.sh.
Thanks for the feedback on the sleepcover stuff. I think lineage has a package that does that job, maybe it isn't included on this build. No idea if you can handle it using magisk or hoking into zygote process, I guess not.

I've finally succeeded in flashing LOS 19 and doing all of the resizing bit. Final step is getting gapps flashed. The recommendation I saw was to use MindTheGapps. The closest one I could find was MindTheGapps-11.0.0-arm64-20210920_084011.zip and it didn't work. It said is was for LOS 18 "or higher". Is there one for LOS 19?

I would like to point out that my system_root partition is /dev/block/dm-1 and not /dev/block/dm-0... I have wondered if this was due to differing recoveries however I am using your latest recovery and it is the same for me... so I would suggest that others do:
Bash:
adb shell
cat /tmp/recovery.log
That will show which one system_root is located at then you can continue with the resize.. otherwise it will give an error saying there arent enough blocks...

ragarcia87 said:
I would like to point out that my system_root partition is /dev/block/dm-1 and not /dev/block/dm-0
Click to expand...
Click to collapse
Thanks!! Never thought about it . Fixed!

Would porting ubports be possible for this device?

paziusss said:
Known issues (and workarounds)
1. MTP doesn't work
You need to flash SM-T500-GSI-kernel.zip from TWRP. Do it only once unless you reverted back to stock boot.img.
2. The rom I've flashed (mostly PixelExperience) reboots after a few seconds/minutes
You need to flash SM-T500-GSI-kernel.zip from TWRP. Do it only once unless you reverted back to stock boot.img.
3. Brightness doesn't work
You need to flash SM-T500-GSI-brightness-fix.zip from TWRP. You need to repeat this again after flashing a new system.img with the same or different rom.
4. Audio doesn't work via bluetooth/jack headphones.
Follow the AUDIO FIX section of https://forum.xda-developers.com/t/...s-nairo-and-some-post-install-tweaks.4364963/, as suggested by @wesleyvanneck12345678
* kernel sources: https://github.com/pazos/android_kernel_samsung_gta4lwifi/
Click to expand...
Click to collapse
I flashed both the kernel and brightness zips but brightness slider still does nothing.

Juppy99 said:
Would porting ubports be possible for this device?
Click to expand...
Click to collapse
Someone please corrent me if I am wrong, but I think the stock kernel needs to have Halium patches applied to it for UbPorts to work. I am not sure what exactly is involved in doing this, but I believe that it is possible. Though that does not mean it will not have bugs without major work being done beyond patching the kernel.

lewmur said:
I flashed both the kernel and brightness zips but brightness slider still does nothing.
Click to expand...
Click to collapse
paziusss said:
For now you can get it working with just 3 commands, until you reboot your device:
Click to expand...
Click to collapse
paziusss said:
adb shell
su
echo 100 > /sys/class/backlight/panel0-backlight/brightness
Click to expand...
Click to collapse
This from the TWRP thread works, the zip didn't. I use Tasker to run the script every boot.

paziusss said:
d confirm. After that you can flash gapps if you want. You must use MindTheGapps arm64 version.
If you choose to flash gapps you'll need to follow https://github.com/phhusson/treble_experimentations/wiki/Frequently-Asked-Questions-(FAQ)#how-to-bypass-certified-device-after-first-boot
Some stuff won't work out of the box (brightness, MTP, bluetooth or wired audio). Please see the next post to learn how to workaround these issues.
Click to expand...
Click to collapse
The get info apk in that link doesn't work in LOS 19. Does anyone know of one that will? Or of another way to get the GFW id?

this is cool, thanks op.....worked a doddle on arch linux, after I followed your instructions for installing TWRP using heimdall
thanks again, u da man! hope you have a happy and prosperous 2022

Tirofog said:
This from the TWRP thread works, the zip didn't. I use Tasker to run the script every boot.
Click to expand...
Click to collapse
Sorry, could you explain better how you set up tasker for that? I can't seem to manage to do it. I 've read somewhere that tasker might have problems with sudo commands... thank you!

Related

[Resurrection Remix] [Unofficial] [2018-08-19] Treble [Discontinued moved to PIE]

LAST PERSONALLY Verified as working and "stable"*: GAPPS, 8/19 GAPPS
First and foremost, I'm simply compiling this for the OnePlus 6 and am making some small tweaks to include Opengapps and not only Go Apps in the builds.
The parent for this by phhusson can be found at [Resurrection Remix] [Unofficial] [2018-05-19] Phh-Treble
Next the most important information where to get the most current build of the ROM: Google Drive
For now I suggest the version ending in -go such as: 'rr_6_1_180616_system-arm64-ab-go.img.xz' as the '-gapp' is in development, I expect a number of builds over the next few days as I finally the build scripts and then the rate to tapper off to every two weeks or as there are changes that seem to warrant it, I'm not building nightly for no reason, as RR 6.1 is reasonable stable at this time.
Note: Attached (build.sh) is the build script currently being used, it is a work in progress. and will be updated in case you more regular builds. You will need 12GB of Ram Ubuntu 16.04+ (I'm using 18.04 now, but I started with 16.04) and at least 360GB (SSD recommended) to build, and upto 6 hours for the initial run and then 2 for ever additional run.
Many thanks to phhusson for allowing me to post this based off of his work.
Changes, when I have something to report. Not all build will:
The 7/7 build includes a number of patches recommended by DocRambone.
Overlay support to force Apps fullscreen, Under Display->Advanced
Some cleanups to the UI for the round corners
Better LED support
The 7/8 build is the same as 7/7, but includes July security patches, I built it in order to match the official release.
The 7/24 build is again to match the official release
The 8/19 build is again to match the official release, note regression in status bar height I'm looking into.
Second post: will have details on what is working and not
Third Post: will have full instructions on installation, backup restore based on my experiences
* Stable is relative, for me if I consider it usable from day to day it is stable.
As of 8/11/2018
In the GAPPS version
Working:
Fingerprint
Camera (Front and Back) + Flash (Also got the OnePlus Camera working*)
Speaker
Wifi (Some cut outs seen, this is not unique to this ROM and is dependent on the access port some are worse than others, no clue why)
Bluetooth
GPS
Brightness
Slider for Notifications as of 6/18 build
Mobile Data/Voice (tested dual SIMM is working)
Google Apps
Root (using magisk 16.3), told but have not personally tested that 16.4 without changes works as well
Ambient (works serious effect on battery see next post)
Full Screen Aspect Ratio Display->Advanced 7/07/2018 build+
More fully functional LED Improved for at least mounting USB sticks in 7/7 build
USB Host - Fixed for at least mounting USB sticks in 7/24 build
Bluetooth Phone audio is on the local headset. - Fixed in 7/24 build
Seems working NFC working 5.1.11 Vendor and Boot, not working with previous to 5.1.9 Vendor and Boot I have nothing to connect to to fully test
Not Working:
The Notch hides content (need to wait for P)
Unknown:
Camera Quality: I do little with the camera and am no photographer, so I can say nothing about quality, only it installed and took pictures
VaSU# said:
volte kinda works you can receive messages and calls and can send messages but cant call "out"
Click to expand...
Click to collapse
Please let me know if anything is missing, or needs to be added
Instructions to flash, backup ...
WARNING: With 5.1.8 I had no WIFI, so I suggest sticking to 5.1.6 to 5.1.7 FOR THE MOMENT
Instructions to flash, backup ...
Total time required about 90 minutes
Pre-Reqs:
First and foremost:
Start with at least 5.1.6 (or greater, as of writing 5.1.7 was the lastest), there are Treble fixes in 5.1.6 we need.
Second
verify you have a good USB cable (the Red one shipped with the phone is best)
Three
download the oneplus drivers and abd
- USB Drivers: OnePlus 6 USB Drivers for Windows
- ADB/Fastboot: ADB/Fastboot latest mini
Install both to your local system
Four
Download the latest TWRP (get both the img and zip files)
TWRP for OnePlus 6
Five
Download the files(Treble OP6 Files 5.1.6) from:
GUIDE] How to flash Treble roms on OnePlus 6
Extract and keep: vbmeta.img (if you are on 5.1.X where is the boot version you can keep the boot.img as well, if not discard).
Six
Download the lastest Oxygen OS ZIP and bootloader from:
[OnePlus 6][ROM][OTA][Oxygen OS] Mirrors for official Oxygen OS ROMs and OTA updates
As of writing this is:
5.1.6 full image: OnePlus6Oxygen_22_OTA_010_all_1806070151_ad8b19ed516e78.zip
5.1.6 boot: OnePlus6Oxygen_22_OTA_010_all_1806070151_boot.img
Seven
Download Device ID:
Device+ID APK
Eight
Download Magisk for Treble:
Magisk modified for treble
Since as of 6/2018 the default magisk does not support Treble we need a special version I suggest: Magisk-v16.3-factory-faizauthar12-20180406.zip as teh latest I could find with support.
Nine
Recommended download fastboot installable 5.1.6 (or latest build):
[ROM][STOCK][FASTBOOT][OP6] Stock Fastboot ROMs for OnePlus 6
Ten
Include Overlay/Ambient Display.
Download APK at: [Overlay] Enable Night Light, Auto-Brightness, Ambient Display & more on Treble ROM
Eleven
OnePlus Camera:
OnePlus Camera APK's
Finally
Download RR 6.0 for Treble compiled after 7/08/2018:
Either download the gapps or go version (gapps is still a work in progress when I wrote this)
ROMs Google Drive
Getting Ready:
WARNING: you will loss all data on your phone, backup anything you want or need, first.
Make sure you can get to fastboot (enable "Advanced Reboot" in developers options and make sure that you can enter on a reboot by pressing volume-down and power at the same time)
Make sure you are on 5.1.6+ (5.1.6 was the latest firmware upon writing this)
Remove Any security you have set (just to be safe)
Reboot to fastboot (bootloader)
run:
Code:
fastboot oem unlock
"You will be greeted with a Unlock Bootloader Warning page, Hit the Vol button to select Yes and turn it Blue and Hit the Power Button to Execute the selection, allow your device to reboot"
Backup EFS
If you have not already I'd recommend backing up EFS (to do so you need to be rooted, or else use TWRP):
Preferred, if rooted simply open a terminal and run:
Code:
su
dd if=/dev/block/sdf2 of=/sdcard/modemst1.bin bs=2048
dd if=/dev/block/sdf3 of=/sdcard/modemst2.bin bs=2048
Copy these files someplace safe!
If not rooted reboot to fastboot (bootloader):
Ensure that the latest twrp is in the same directory as fastboot (C:\Program Files (x86)\Minimal ADB and Fastboot) and run (3.2.1 was the lastest as of writing this):
Code:
fastboot.exe boot twrp-3.2.1-0-enchilada.img
This will boot the phone into twrp
Allow modification
Select backup
select only EFS and Modem
enter a meaningful name
swipe to backup
click "Reboot System" -> "Do not Install" for TWRP if asked.
You can now locate the backup under /storage/TWRP/BACKUPS and move it to a safe location off the phone.
Backup the Phone
Recommended if you care: Backup your entire phone using TWRP as well:
Ensure that the latest twrp is in the same directory as fastboot (C:\Program Files (x86)\Minimal ADB and Fastboot) and run (3.2.1 was the lastest as of writing this):
- fastboot.exe boot twrp-3.2.1-0-enchilada.img
This will boot the phone into twrp
Allow modification
Select backup
Select Everything except EFS and Modem
enter a meaningful name
swipe to backup
click "Reboot System" -> "Do not Install" for TWRP if asked.
You can now locate the backup under /storage/TWRP/BACKUPS and move it to a safe location off the phone.
Installing RR:
Finally we are ready to install RR (or any other Treble ROM), on the OnePlus 6. You will need a build from 6/7/2018 or later to have the required Vender-Hal to be present.
You will need to locate and install the AB version for the OnePlus 6.
Note: I'm using RR from 6/13 as the base for the guide: system-arm64-ab-gapps.img
SEE FIRST POST FOR CURRENT DOWNLOAD LOCATION I compiled this using phhusson's (Orginial Build Scripts)
instructions and a bit of setup on Linux. However most Treble base ROM's should work so long as they are from after 6/7/2018 in a similar manor.
* Remember this will wipe your device and you will loss all data *
First
boot in to fastboot (bootloader):
We need to go back to TRWRP and wipe internal storage and data to be safe, as the -w option to do so when flashing is not working for me.
- fastboot.exe boot twrp-3.2.1-0-enchilada.img
This will boot the phone into twrp
Allow modification
Select Wipe
Advanced Wipe
Select Cache, Data and "Internal Storage"
Swipe to Wipe
Click back until you are at the main menu
Click on Reboot
Click on Bootloader -> "Do not Install" for TWRP if asked.
Second
Flash the new ROM:
Flash vbmeta.img to remove validation
Code:
fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
To be safe flash a default boot image (5.1.6 in this case)
Code:
fastboot flash boot_a boot.img
fastboot flash boot_b boot.img
Next reboot into recovery (you need to do this with volume down +Power, or selecting from bootload):
In stock recovery select English
Select Wipe Data and Cache
Reset system settings->yes->done
Wipe Cache->Yes->done
Erase everything->Thiscan not be undone, continue->done
back
Advanced
Reboot to fastboot->Reboot to fastboot
Now flash a the new ROM:
- fastboot flash system_a system-arm64-ab-gapps.img
- fastboot flash system_b system-arm64-ab-gapps.img
Three
reboot:
Code:
fastboot reboot
You will see the "andorid" boot screen (this is different that the Oxygen one) and being the first boot it could take a while. If you see no boot screen or it does not boot (give 10 minutes), then you likely need to repeat these steps again. If you boot into RR then continue.
You may get a Vender image mistake error ignore it it only appewars on boot.
Skip the Setup by clicking all four corners top left->top right->bottom right->bottom left (it my take more than one try), at this point you have no networking, that is what we want.
Suggestion make backup here as you have a working OS! -- Instructions to follow
Four
Move over required files: You now have RR installed and working:
Enable developer mode and then enable Advanced Reboot
Then copy over gapps-nano, Device+ ID.apk, magisk-manager apk and magisk installer zip to the phone
To get the magisk manager you need to extract it from the zip as I cloud not get the normal one to install. Extract the zip: Magisk-v16.3-factory-faizauthar12-20180406.zip copy common\magisk.apk to the phone
Five
Deal with: "Play Services not Certified by Google":
Install Device+ID (APK downloaed above) and Open
Once done open the second line shows the GSF ID for this device
Android Register GSF
Login using a gmail account (I suggest the one you use for the playstore)
Enter the GSF in the field, now we wait about 5 to 10 minutes for it to propigate
Reboot the phone as we want paly services to start fresh
First add a wIFI network.
Critical do not let any apps update until you have registered playstore, so if you see a notification saying downloading, select and click pause. Doing so with the updated 6/17 paystore resulted in a black screen where you would enter your password, no know work around other than reset if this happens.
click on playstore it should now start
Now login to your account and you should be go (it may take more than one attempt no idea why).
Now enable the update if previously paused
Update all Apps from the playstore before continuing, this may take a while give it 10 minutes
Optional: If you want remove Device+ID now (but I leave it as it is an easy way to get information).
You now have a working Playstore, if you have hung downloads then you may need to clear the cache for play services and the playstore I assume the unregistered might be the cause of them getting messed up.
Five
Install magisk:
Ensure you copied magisk zip and also the magisk manager apk to your phone, do not open, but click Done
Install the magisk manager, by locating the file in filemanager and selecting it.Reboot into fastbboot (bootloader) mode
Load TWRP:
Code:
fastboot.exe boot twrp-3.2.1-0-enchilada.img
Install
Select the magisk zip from the filesystem and flash
clear cache
Reboot->System (If asked about installing TWRP swipe to install)
Allow the phone to fully boot
Suggested: Reboot the phone
Suggested: disable checks for updates as 5.7 does not work with this build.
Root is now setup.
Six
Installer th onPlus camera:
Many people want the one plus camera, copy the apk downloaed above to the phone.
Open and install via a file manager
Seven
resize Data (as it will be only 11GB), the partitioon will be larger, depending on your devide se we will use TWRP and resize2fs to grow it.
Reboot into fastbboot (bootloader) mode
Load TWRP:
Code:
fastboot.exe boot twrp-3.2.1-0-enchilada.img
Advanced->Terminal
Code:
resize2fs /dev/block/sda17
Reboot System
Eight
Recommended, make a backup of your hard work:
Reboot into fastbboot (bootloader) mode
Load TWRP:
Code:
fastboot.exe boot twrp-3.2.1-0-enchilada.img
Select backup
Select Everything except EFS and Modem (as I'm unsure exactly which you need)
enter a meaningful name
swipe to backup
click "Reboot System" -> Swipe to reboot
Once back in RR copy the backup off the phone
Eight
Start using your OnePlus 6 with RR 6.0, rooted and with GAPPS
Nine
Upgrading:
Upgrading is simply replacing the system partitions and only these paritions (tested going from 6/13->6/16->6/17 builds)
Boot into fastboot (advanced reboot options)
Now flash the new system files:
- fastboot flash system_a new_system-arm64-ab-gapps.img
- fastboot flash system_b new_system-arm64-ab-gapps.img
Load TWRP:
Code:
fastboot.exe boot twrp-3.2.1-0-enchilada.img
Select Wipe
Advanced Wipe
Select Cache (and only Cache)
Swipe to Wipe
Reboot System
Ten
Restoring a Backup from TWRP
*This is a work in progress I can not work out how to do so safely*
Code:
fastboot.exe boot twrp-3.2.1-0-enchilada.img
Select Restore
Select the backup
Select Everything (other than EFS and Modem!)
Got to the main menu
Select Wipe
Advanced Wipe
Select Cache (and only Cache)
Swipe to Wipe
Reboot Fastboot
Eleven
Night Light, Ambient Display, requires Root:
My suggestion is not to do this if you care abut battery as I've seen major drain (even with Ambient display disabled, testing this).
Copy the apk downloaded framework-res__auto_generated_rro.apk to /vendor/overlays
Code:
mount -o rw,remount -t ext4 /vendor
cp <location of file> /vendor/overlay
chcon u:object_r:vendor_overlay_file:s0 /vendor/overlay;chcon u:object_r:vendor_overlay_file:s0 /vendor/overlay/framework-res__auto_generated_rro.apk
Reboot
Comments:
TWRP does not boot if flashed onto RR (the TWRP logo appears but it will not boot), this is currently only go to protect you from using the OnePlus Recovery and messing up RR. Flashing TWRP does not affect booting into RR.
TWRP DOES handle encryption without an issue, even a wrong first pin is not an issue
TWRP making a backup of Treble ROM, backup everything for now: Data, Boot, System, System Image, Vendor, Vendor Image.
If you have problems with hung downloads from the Playstore: Pending hung PlayStore
Wifi can be flaky (appearently this is a more general issue as even stock had some issues, I fixed them by only using either 2.4 or 5Mhz wireless, if I had both active I had constant disconnects.
Worst case, to recovery, back to Oxygen 5.1.6 if you end up in a boot loop stuck booting to rtecovery, etc:
- flash-all.bat
Reboot into recovery (you need to do this with volume down +Power, or selecting from bootload):
In stock recovery select English
Select Wipe Data and Cache
Reset system settings->yes->done
Wipe Cache->Yes->done
Erase everything->This can not be undone, continue->done
back
Advanced
Reboot to fastboot->Reboot
Load TWRP:
Code:
fastboot.exe boot twrp-3.2.1-0-enchilada.img
Copy the Oxygen full ROM back to the phone
Code:
adb push OnePlus6Oxygen_22_OTA_010_all_1806070151_ad8b19ed516e78.zip /sdcard
In TWRP
Install
Select OnePlus6Oxygen_22_OTA_010_all_1806070151_ad8b19ed516e78.zip
Go back to the root and select Advanced Wipe
Select Wipe
Advanced Wipe
Select Cache, Data and "Internal Storage"
Click on Reboot->Recovery (select Do not Install)
English
Wipe Cach and Data
Wipe Everything
Reboot
The phone will reboot same as the day it was made
If it does not then please refer to:
Mega Unbrick Guide for A Hard Bricked OnePlus 6
Note: Always boot fully at least once (I suggest twice and the first one is configuring android) before trying any steps above again.
Best of Luck, see a typo let me know
ERIC
thank you for this
[emoji102][emoji102][emoji102][emoji102][emoji102]
Sent from my ONEPLUS A6003 using Tapatalk
Thank you for putting so much hard work on this. Really much appreciated, will give it a try.
Might be a noob question, but due to treble, is the camera quality the same with the OnePlus app?
saintxseiya said:
Might be a noob question, but due to treble, is the camera quality the same with the OnePlus app?
Click to expand...
Click to collapse
No.
Great rom, I especially like the fact that I can choose to install without gapps (prefer fdroid). One thing that is missing is ambient display, hopefully it will be fixed sooner or later.
Stock OOS Cam on RR. Isn't that huge news? Wow! :good:
Abaddon said:
No.
Click to expand...
Click to collapse
Have you tried this yourself? Ignore the treble part of his comment, but why would stock cam on OOS vs stock cam on custom ROM give different results in terms of picture quality?
Pat123 said:
Stock OOS Cam on RR. Isn't that huge news? Wow! :good:
Have you tried this yourself? Ignore the treble part of his comment, but why would stock cam on OOS vs stock cam on custom ROM give different results in terms of picture quality?
Click to expand...
Click to collapse
same quality here
Pat123 said:
Stock OOS Cam on RR. Isn't that huge news? Wow! :good:
Have you tried this yourself? Ignore the treble part of his comment, but why would stock cam on OOS vs stock cam on custom ROM give different results in terms of picture quality?
Click to expand...
Click to collapse
Never said anything about results, only that it could be installed and works, (takes pictures), personally I do little with the camera and am not photographer, but it can be installed (link above) and installed.
Updated the working to remove any confusion.
Maibol said:
same quality here
Click to expand...
Click to collapse
Could you post some comparison pics? Including portrait shots.
Would be awesome.
saintxseiya said:
Could you post some comparison pics? Including portrait shots.
Would be awesome.
Click to expand...
Click to collapse
sorry bro celebrating today with the family too much beer .....
So seeing this not even a month after the release of the op6 makes me happy and hopeful that we get a fully working RR-OS for the OP6 in the near future !
Pat123 said:
Stock OOS Cam on RR. Isn't that huge news? Wow! :good:
Have you tried this yourself? Ignore the treble part of his comment, but why would stock cam on OOS vs stock cam on custom ROM give different results in terms of picture quality?
Click to expand...
Click to collapse
because Oneplus doesnt release blobs for camera
Pat123 said:
Stock OOS Cam on RR. Isn't that huge news? Wow! :good:
Have you tried this yourself? Ignore the treble part of his comment, but why would stock cam on OOS vs stock cam on custom ROM give different results in terms of picture quality?
Click to expand...
Click to collapse
It will never be the same as OOS stock. Because aside from there is no device tree provided by OnePlus, they will never release the camera blobs due to licensing issues. Once we get a stable and proper gcam port. It'll be better than the stock OOS cam or close
is a beautiful Rom, will there be an adaptation for twrp? I have to use the gapps, because at the go version Wear OS does not work. and in the gapp version would be nice if the smartbar was running. Unfortunately, the kill app does not work ( I can not use xposed, then my bank app will not work anymore
unix2208 said:
is a beautiful Rom, will there be an adaptation for twrp? I have to use the gapps, because at the go version Wear OS does not work. and in the gapp version would be nice if the smartbar was running. Unfortunately, the kill app does not work ( I can not use xposed, then my bank app will not work anymore
Click to expand...
Click to collapse
TWRP not for now as treble is build as an image, but you should be able to flash using twrp just switch to img (though I have not tested that).
The GApps version is posted the 6/18 is working great, see second post.
As for Banking I'm unsure if any Treble based ROM passed the checks, as with or without root, as they appear as unsigned.
As for smartbar, I'll give it a try when I get a chance, as I do not use it personally.
ERIC
So safetynet won't pass?

[guide] steps to flash gsi on redmi note 7

[GUIDE] STEPS TO FLASH GSI ON REDMI NOTE 7 [lavender]​
Many of us tried Flashing GSI on our Redmi Note 7 but failed due to various reasons even though it is absolutely bugless for Redmi Note 7 .
Here are the steps which i will mention below that will let us use the full potential of GSI.
Requirements :
Bootloader Unlocked
TWRP Installed
Ofcourse a working device
Installation Method :
First of all we need the flash the latest chinese beta rom.It gets updated everyweek. Since I have the cn rn7 i prefer to update the vendor partition everyweek for fixes and latest updates.But you can try on your stable rom too (I can't gurantee if things will work out on stable rom or not) .So, first of all be on china beta rom.
Go to fastboot mode and connect your pc to your device .You need to have installed xiaomi drivers to make this work properly. Once you are in fastboot ,open a terminal/cmd and type : fastboot -w ( this will erase your existing system partition and data and internal storage too , so make sure to have a backup if you have something essential on ur device)
Now considering that we have already downloaded a gsi i.e a phh GSI ..now for this case we are gonna assume its aosp as an example.. while in the fastboot mode type : fastboot flash system system.img ( here system.img(it can be of different name too) is the gsi img which you download from phh thread).
Remember : once the flash is completerd reboot to TWRP and not to system.
Once you are in twrp , flash magisk ( flash magisk latest canary as it has support for system as root devices) then press on wipe button of twrp,,,then advanced wipe..then tick mark on system and you will see repair or change file system option.Click on it..Click on repair and resize file system.
Now go to mount settings and mount system partition. Now you can flash gapps if you want .
After flashing gapps finally reboot to system
Voila! After in about 5 mins you will be booted to GSI rom
Post Installation Method :
You will have almost everything working after booting into gsi except you will run into brightness bug which you can fix by the following way
Connect your device with pc and enable mass storage
open a cmd/terminal on ur pc
type the following codes : adb shell
su ( in this case you will have to give permission from your device ; grant it)
setprop persist.sys.qcom-brightness 4095
Congragulations Now you have installed a gsi perfectly on your device
In this way you can flash almost all the gsi available on phh thread Hope this clarifies all of our problems.
Hit Thanks if I helped you somehow with this
shouldn't you be flashing disable_encrypt zip too?
repair or change file system option.Click on it..Click on repair and resize file system. I don''t get this one. There are a few options inside
PROdelision said:
shouldn't you be flashing disable_encrypt zip too?
Click to expand...
Click to collapse
No, its not required.
chiplovez9x said:
repair or change file system option.Click on it..Click on repair and resize file system. I don''t get this one. There are a few options inside
Click to expand...
Click to collapse
Make sure you have allowed modifications on system partition and also you dont have system as read only.
Does fingerprint working on GSI?
what is gsi?
I don't know much but gsi means u can flash almost all roms (which have images). And most of ROMs do have gsi images.. So u can install any rom on your phone. I don't know the steps to do so.. ?
bryanngapopala said:
what is gsi?
Click to expand...
Click to collapse
Simple speaking it's a image with clear android from google
Has anyone tested RR PIE GSI on RN7? Does it work?
Is it possible to boot Android O GSI? :silly:
letsmakecakes said:
No, its not required.
Click to expand...
Click to collapse
here's everything i did:
on miui beta.....already encrypted.
did fastboot -w
flashed latest RR gsi via fastboot
booted to twrp, flashed magisk(v19), repair and resize
reboot
asks for decryption password
where exactly am i going wrong?
able to boot if im using decrypt zip but lockscreen doesnt work.
Is the. Method the same for the global version with global rom?
letsmakecakes said:
[GUIDE] STEPS TO FLASH GSI ON REDMI NOTE 7 [lavender]​
Many of us tried Flashing GSI on our Redmi Note 7 but failed due to various reasons even though it is absolutely bugless for Redmi Note 7 .
Here are the steps which i will mention below that will let us use the full potential of GSI.
Requirements :
Bootloader Unlocked
TWRP Installed
Ofcourse a working device
Installation Method :
First of all we need the flash the latest chinese beta rom.It gets updated everyweek. Since I have the cn rn7 i prefer to update the vendor partition everyweek for fixes and latest updates.But you can try on your stable rom too (I can't gurantee if things will work out on stable rom or not) .So, first of all be on china beta rom.
Go to fastboot mode and connect your pc to your device .You need to have installed xiaomi drivers to make this work properly. Once you are in fastboot ,open a terminal/cmd and type : fastboot -w ( this will erase your existing system partition and data and internal storage too , so make sure to have a backup if you have something essential on ur device)
Now considering that we have already downloaded a gsi i.e a phh GSI ..now for this case we are gonna assume its aosp as an example.. while in the fastboot mode type : fastboot flash system system.img ( here system.img(it can be of different name too) is the gsi img which you download from phh thread).
Remember : once the flash is completerd reboot to TWRP and not to system.
Once you are in twrp , flash magisk ( flash magisk latest canary as it has support for system as root devices) then press on wipe button of twrp,,,then advanced wipe..then tick mark on system and you will see repair or change file system option.Click on it..Click on repair and resize file system.
Now go to mount settings and mount system partition. Now you can flash gapps if you want .
After flashing gapps finally reboot to system
Voila! After in about 5 mins you will be booted to GSI rom
Post Installation Method :
You will have almost everything working after booting into gsi except you will run into brightness bug which you can fix by the following way
Connect your device with pc and enable mass storage
open a cmd/terminal on ur pc
type the following codes : adb shell
su ( in this case you will have to give permission from your device ; grant it)
setprop persist.sys.qcom-brightness 4095
Congragulations Now you have installed a gsi perfectly on your device
In this way you can flash almost all the gsi available on phh thread Hope this clarifies all of our problems.
Hit Thanks if I helped you somehow with this
Click to expand...
Click to collapse
Which GSI should be needed to take? A-only or A/B ?
PROdelision said:
here's everything i did:
on miui beta.....already encrypted.
did fastboot -w
flashed latest RR gsi via fastboot
booted to twrp, flashed magisk(v19), repair and resize
reboot
asks for decryption password
where exactly am i going wrong?
able to boot if im using decrypt zip but lockscreen doesnt work.
Click to expand...
Click to collapse
I have no experience with GSI images, but I know in general that PIE breaks the encryption, if you roll back the security patch level. I don't know it this happened in your case, but I have lost couple of times my encrypted storage when I have tried to restore a backup of rom with older android patch level. After that, the bootup encryption pin is no longer accepted, neither by android nor by twrp, so the only option is to format data to remove encryption and start from scratch.
Were your miui beta and rr gsi of the same android security patch level?
Getting WRONG PIN error after setting up pin ???
letsmakecakes said:
[GUIDE] STEPS TO FLASH GSI ON REDMI NOTE 7 [lavender]
Many of us tried Flashing GSI on our Redmi Note 7 but failed due to various reasons even though it is absolutely bugless for Redmi Note 7 .
Here are the steps which i will mention below that will let us use the full potential of GSI.
Requirements :
Bootloader Unlocked
TWRP Installed
Ofcourse a working device
Installation Method :
First of all we need the flash the latest chinese beta rom.It gets updated everyweek. Since I have the cn rn7 i prefer to update the vendor partition everyweek for fixes and latest updates.But you can try on your stable rom too (I can't gurantee if things will work out on stable rom or not) .So, first of all be on china beta rom.
Go to fastboot mode and connect your pc to your device .You need to have installed xiaomi drivers to make this work properly. Once you are in fastboot ,open a terminal/cmd and type : fastboot -w ( this will erase your existing system partition and data and internal storage too , so make sure to have a backup if you have something essential on ur device)
Now considering that we have already downloaded a gsi i.e a phh GSI ..now for this case we are gonna assume its aosp as an example.. while in the fastboot mode type : fastboot flash system system.img ( here system.img(it can be of different name too) is the gsi img which you download from phh thread).
Remember : once the flash is completerd reboot to TWRP and not to system.
Once you are in twrp , flash magisk ( flash magisk latest canary as it has support for system as root devices) then press on wipe button of twrp,,,then advanced wipe..then tick mark on system and you will see repair or change file system option.Click on it..Click on repair and resize file system.
Now go to mount settings and mount system partition. Now you can flash gapps if you want .
After flashing gapps finally reboot to system
Voila! After in about 5 mins you will be booted to GSI rom
Post Installation Method :
You will have almost everything working after booting into gsi except you will run into brightness bug which you can fix by the following way
Connect your device with pc and enable mass storage
open a cmd/terminal on ur pc
type the following codes : adb shell
su ( in this case you will have to give permission from your device ; grant it)
setprop persist.sys.qcom-brightness 4095
Congragulations Now you have installed a gsi perfectly on your device
In this way you can flash almost all the gsi available on phh thread Hope this clarifies all of our problems.
Hit Thanks if I helped you somehow with this
Click to expand...
Click to collapse
Hi!
Did you not disable dm-verity and force-encryption?
Another question, the dev MIUI roms contain both the system and vendor partitions, right? How do you install only the vendor partitions from them? Or do you just flash MIUI and then reflash the custom ROM system? In that case, won't that affect dm-verity and encryption on the data partition?
Flashing correctly a GSI like in this guide; with vendor ecc ecc, will gcam work? Actually i'm on stock MIUI 10 and obv all working fine with a perfect version. My doubt is it.
Forever Alone said:
Getting WRONG PIN error after setting up pin ???
Click to expand...
Click to collapse
Did you not erase your /data partition through TWRP?
---------- Post added at 03:06 AM ---------- Previous post was at 02:46 AM ----------
Forever Alone said:
Getting WRONG PIN error after setting up pin ???
Click to expand...
Click to collapse
Did you not erase your /data partition through TWRP?
any recommended gsi rom with no bug?
booladi said:
Did you not erase your /data partition through TWRP?
---------- Post added at 03:06 AM ---------- Previous post was at 02:46 AM ----------
Did you not erase your /data partition through TWRP?
Click to expand...
Click to collapse
I did wipe userdata but not internal storage. heard its because i have unencrpyed data partition?

[EXPERIMENTAL][RECOVERY][3.4.0][umi]Unofficial TWRP for Mi 10 Unified

Team Win Recovery Project 3.x, or twrp3 for short, is a custom recovery built with ease of use and customization in mind. Its a fully touch driven user interface no more volume rocker or power buttons to mash. The GUI is also fully XML driven and completely theme-able. You can change just about every aspect of the look and feel.
Code:
#include <std_disclaimer.h>
/*
*
* We are not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at us for messing up your device, we will laugh at you.
*
*/
Features:
- TWRP boots.
- Decryption is working.
- Vibration
- System, Vendor and Product partitions mount is working but you can't modify them.
- You can flash magisk, miui roms, kernels, firmwares, etc.
Not working:
- Partition formatting (upstream)
- ADB sideload (upstream)
Install guide:
To boot (Reccomended):
Code:
fastboot boot <twrp.img>
To install (NOT reccomended):
Code:
fastboot flash recovery <twrp.img>
Download:
Now build is checking "ro.boot.hwversion". If it is begined with "1" then use Mi 10 Pro cmi profile, otherwise it will use Mi 10 umi profile.
Please report ro.boot.hwversion if possible. You can get it from getprop command.
Mega Drive Link
Source code:
Device Tree
Recovery Source
Thanks:
@mauronofrio @bigbiff and more open source TWRP devs.
Mi 10 Pro (cmi) thread:
https://forum.xda-developers.com/xi...xperimental-unofficial-twrp-mi-10-10-t4106385
USB OTG ?
Hi,
very important for me: is USB OTG working to read ROM from it ?
thank you !
Tested : USB OTG not working.
fastboot reboot recovery.img hangs the phone.
Solved using another twrp for the moment.
adario73 said:
Hi,
very important for me: is USB OTG working to read ROM from it ?
thank you !
Click to expand...
Click to collapse
It should work but I could not test it for you...
Great. Here we start development section.
tested:
can not mount system and vendor.
if you choose : reboot - recovery ( in this TWRP), the device will hang on fastboot.
k1n9n0th1n9 said:
tested:
can not mount system and vendor.
if you choose : reboot - recovery ( in this TWRP), the device will hang on fastboot.
Click to expand...
Click to collapse
Could you fetch a copy of log at /cache/recovery/log.gz for me?
You can only mount them with read only flag. It's super partition's limit.
Will mi 10 get twrp and other custom roms stuff??
---------- Post added at 12:58 PM ---------- Previous post was at 12:57 PM ----------
No custom development till 5 months??!!
Hi guys, new build (rev. 2) has been uploaded. Tested fastboot flash recovery is working.
The way to fix it is just appending recovery dtbo from official recovery. OTG might still not working. Source code has been updated.
cc @k1n9n0th1n9 @adario73
simonsmh said:
Hi guys, new build (rev. 2) has been uploaded. Tested fastboot flash recovery is working.
The way to fix it is just appending recovery dtbo from official recovery. OTG might still not working. Source code has been updated.
cc @k1n9n0th1n9 @adario73
Click to expand...
Click to collapse
can not select partitions system and vendor to mount
k1n9n0th1n9 said:
can not select partitions system and vendor to mount
Click to expand...
Click to collapse
Even with read-only flag? You could only mount system and vendor as read-only.
Do not try to Chmod 755 cause phone won't boot! even after ROM installed and rooted, do not do that with any file manager cause will stop the phone from booting!
head_djmusic said:
Do not try to Chmod 755 cause phone won't boot! even after ROM installed and rooted, do not do that with any file manager cause will stop the phone from booting!
Click to expand...
Click to collapse
Just don't do that if you are unfamiliar with AVB. You could disable this security feature by reflash vbmeta.img with disable verity and disable verification flag with fastboot. You can find more infomation on Google.
k1n9n0th1n9 said:
can not select partitions system and vendor to mount
Click to expand...
Click to collapse
Hi guys, new build (rev. 3) has been uploaded for fixing mount issue, please test when you have free time.
simonsmh said:
Hi guys, new build (rev. 3) has been uploaded for fixing mount issue, please test when you have free time.
Click to expand...
Click to collapse
Decryption works fine.
First I chose [Mount]: System was not checked, Vendor had a checkmark. Then I unticked Vendor and tried to mount it again. But both aren't able to get mountet within rev.3.
Backing up System isnt working too.
recover log is attached.
nocturnoz said:
Decryption works fine.
First I chose [Mount]: System was not checked, Vendor had a checkmark. Then I unticked Vendor and tried to mount it again. But both aren't able to get mountet within rev.3.
Backing up System isnt working too.
recover log is attached.
Click to expand...
Click to collapse
It's pretty weird since I didn't have this issue on my side, could you try it at command line?
Code:
mount /dev/block/mapper/system /system_root
Then check the result it printed and see if it mounts under /system_root
I also remembered that I flashed the miui rom for testing twrp, and after that I could mount both system and vendor. Could you have a try?
-----
Could you grab a logcat for me?
Code:
adb logcat > logcat.log
nocturnoz said:
Decryption works fine.
First I chose [Mount]: System was not checked, Vendor had a checkmark. Then I unticked Vendor and tried to mount it again. But both aren't able to get mountet within rev.3.
Backing up System isnt working too.
recover log is attached.
Click to expand...
Click to collapse
same
simonsmh said:
It's pretty weird since I didn't have this issue on my side, could you try it at command line?
Code:
[B]1.: mount /dev/block/mapper/system /system_root[/B]
Then check the result it printed and see if it mounts under /system_root
I also remembered that I flashed the miui rom for testing twrp, and after that I could mount both system and vendor. 2. Could you have a try?
-----
Could you grab a logcat for me?
Code:
[B]3. adb logcat > logcat.log[/B]
Click to expand...
Click to collapse
1.: mount: '/dev/block/mapper/system/system_root' not in fstab
2.: I'm running MIUI.EU 12 20.5.24 (weekly)
3.: ADB Sideload isn't working in TRWP.
nocturnoz said:
It's pretty weird since I didn't have this issue on my side, could you try it at command line?
Then check the result it printed and see if it mounts under /system_root
I also remembered that I flashed the miui rom for testing twrp, and after that I could mount both system and vendor. 2. Could you have a try?
-----
Could you grab a logcat for me?
1.: mount: '/dev/block/mapper/system/system_root' not in fstab
2.: I'm running MIUI.EU 12 20.5.24 (weekly)
3.: ADB Sideload isn't working in TRWP.
Click to expand...
Click to collapse
1. There is a space in it.
2. I will have a try with eu at weekends.
3. Since you can decrypt your data, I suggest you put it in your /sdcard instead. I will try to fix sideload soon.
Still it would be very helpful if you could grab a logcat for me.
simonsmh said:
1. There is a space in it.
2. I will have a try with eu at weekends.
3.Since you can decrypt your data, I suggest you put it in your /sdcard instead. I will try to fix sideload soon.
Still it would be very helpful if you could grab a logcat for me.
Click to expand...
Click to collapse
1. mount /dev... gave an error that -t is required
1a.
Code:
mount -t /dev/blck/mapper/system /system_root
mount: '/dev/blck/dm-2' -> '/system_root': Device or resource busy
2. TWRP Backup is possible until vendor backup. Then I'll get Error 255.
3. How do I do that? :/
4. When I'm on my ROM MIUI 12, then I'll connect the phone via USB and launch the ADB logcat commmand? Or where do I have to get the logcat from?
nocturnoz said:
1. mount /dev... gave an error that -t is required
1a.
Code:
mount -t /dev/blck/mapper/system /system_root
mount: '/dev/blck/dm-2' -> '/system_root': Device or resource busy
2. TWRP Backup is possible until vendor backup. Then I'll get Error 255.
3. How do I do that? :/
4. When I'm on my ROM MIUI 12, then I'll connect the phone via USB and launch the ADB logcat commmand? Or where do I have to get the logcat from?
Click to expand...
Click to collapse
Hi,
I mean logcat of TWRP, you can grab it on TWRP boot. ADB sideload is confirmed not working for now.
Could you try my latest build (rev.4) first? I rebased upstream source to see if it would fix system mounting issue for you.

[RECOVERY][TB-X505F][UNOFFICIAL] TWRP 3.6.x for Lenovo Tab M10 HD

This version of TWRP works on the Lenovo TB-X505F (wifi).
For the TB-X505X, see this thread. For the TB-X605F/L, see this thread.
For the TB-X606F/L, see this thread. The X606F/L is the second gen M10 and it uses a Mediatek SOC.
Code:
#include <std_disclaimer.h>
/*
* We are not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at us for messing up your device, we will laugh at you.
*/
Working:
AFAIK, everything is working including:
data decryption
MTP
Known issues:
time not adjusting for Daylight Saving
OTA (for a workaround see this post)
Before installing TWRP
Before you install TWRP, upgrade your tablet to the Android 9 (Pie) or Android 10 (Q) stock ROM.
This tablet shipped with Android 8 (Oreo), in which the bootloader did not allow unlocking. When you tried to unlock the bootloader, it gave this error message:
Code:
fastboot oem unlock-go
FAILED (remote: 'unknown command')
fastboot: error: Command failed
Installation
It is recommended that you also install Magisk. This will ensure TWRP remains your default recovery.
Step-by-step guide
download TWRP to your PC (see the Download section below)
download magisk.apk to your MicroSD or OTG device. Get the latest Magisk apk file here. Rename the filetype from apk to zip (for example Magisk-v22.0.zip)
if your bootloader is already unlocked, go to step 4. To unlock bootloader:
on tablet: go to Settings->System->About and press "Build number" 7 times to enable Developer Options.
on tablet: go to Settings->System->DeveloperOptions. Turn on: "OEM unlocking" and "USB debugging".
connect tablet to your computer. Tablet will ask for permission to "Allow USB debugging". Tick "always allow" and select "OK".
backup any files you want to keep to an external device (MicroSD/OTG/computer), because the next step will wipe all your photos, files, google account etc on the tablet.
Now unlock the bootloader:
Code:
adb reboot bootloader
fastboot oem unlock-go
fastboot reboot
flash the twrp image:
Code:
adb reboot bootloader
fastboot flash recovery twrp.img
if you haven't loaded Magisk yet, go to step 6. If you have already loaded Magisk, you can just reboot and you're finished:
Code:
fastboot reboot
adb reboot recovery
load Magisk (step one): reboot to recovery. Do not reboot into the system, because it will over-write TWRP with stock recovery. If that happens, go back to step 4 and start again. When you issue the reboot command (below), you have to immediately press the button combination to reboot to recovery (TWRP). Here are the steps:
issue the reboot command:
Code:
fastboot reboot
immediately press and hold all three buttons (Pwr+VolUp+VolDown). The tablet might reboot twice. Release all the buttons when you see the TWRP screen, or hear your PC acknowledge that ADB is connected.
load Magisk (step two): flash Magisk. In TWRP:
select "Install"
use "select storage" to locate device you stored magisk.zip on.
press the OK button
select the Magisk zip file
swipe to confirm Flash
when Magisk is finished, hit the "Reboot System" button
finished!
If you prefer to use button combos, rather than fastboot/ADB commands:
Vol Down + Power = fastboot mode
Vol Up + Vol Down + Power = recovery mode
Changelog
Code:
01/03/2023 - bug fix: data partition again backs up and restores correctly
20/01/2023 - add TW_EXTRA_LANGUAGES and TB_X505F_S001149_221115_ROW kernel (credit to @Tonyha7 )
30/12/2022 - add system partition to AdvancedWipe (TB_X505F_S001147_220830_ROW firmware only)
15/11/2022 - TWRP 3.7.0-0 update
- support for TB_X505F_S001147_220830_ROW
18/12/2021 - TWRP 3.6.0-0 update
- support for A12 decryption (keymaster)
27/03/2021 - TWRP 3.5.1-0 update
- change to landscape mode for tablets
01/01/2021 - TWRP 3.5.0-0: initial release
Downloads
TWRP 3.7.0-0 for X505F: twrp-X505F_11.img (for TB_X505F_S001147_220830_ROW and above)
TWRP 3.6.0-0 for X505F: twrp-X505F_11_2021.img (for earlier stock ROMs)
Source code
https://github.com/minimal-manifest-twrp/platform_manifest_twrp_aosp/tree/twrp-11
https://github.com/Yahoo-Mike/recovery_device_lenovo_X505F/tree/android-11.0
Credits
The guys at TeamWin Recovery Project.
Everyone whose device trees I plagiarised from GitHub.
Contributors
Yahoo Mike
Tonyha7
Last Updated 2023-03-01 (fix /data backup/restore)
Created 2021-01-01
reserved
Thanks for useful post,
Possible to reboot into recovery from fastboot?
zubair1836 said:
Thanks for useful post,
Possible to reboot into recovery from fastboot?
Click to expand...
Click to collapse
Not that I know of. The bootloader accepts the command fastboot reboot recovery, but boots to system anyway.
Hello there, I've been looking how to install this on my slow tablet for almost like an hour. Could there be some tutorial or extended explanation to the process and installation, I'm such a noob, sorry.
This worked for me. Thank you for your effort and the TWRP!
Worked for me too - many thanks!
Can't wait for a custom ROM!
TWRP Recovery Installation Steps
1. Download android platform tools
2. Unlock developer mode on the M10
3. Enable USB debugging on the M10
3. OEM unlock enable on the M10
4. XDA download TWRP copy to sd
5. Download Magisk app (from Github!!! johnwu), change extension to .zip
6. Adb to fastboot
7. fastboot flash recovery [filename.img]
8. Turn off device
9. Turn on device holding all 3 buttons, release when see Lenovo splash screen
10. In TWRP find Magisk zip
11. Install Magisk
Stock ROM Recovery
1. Download qualcomm drivers 64 bit install
2. Download Lenovo recovery and image tool windows app from Lenovo support website
3. Fastboot oem edl
4. Turn off M10
5. Start recovery windows app, wait till instructions
6. Hold volume up (up is the side of the button closest to the front camera) and insert cable
7. Release button after windows app detects device
8. Troubleshoot by checking windows device manager for the M10 appears as a Qualcomm device
I'm thinking about getting one of these tablets, but before I do so I'd like to know that the screen lock still works after installing TWRP.
This might sound like a crazy question, but my Samsung Tab A won't set a screen lock - pattern, PIN or password - once TWRP has been installed, and I'd rather not run into the same issue again.
Heeni said:
I'm thinking about getting one of these tablets, but before I do so I'd like to know that the screen lock still works after installing TWRP.
This might sound like a crazy question, but my Samsung Tab A won't set a screen lock - pattern, PIN or password - once TWRP has been installed, and I'd rather not run into the same issue again.
Click to expand...
Click to collapse
Confirmed working normally.
zubair1836 said:
Confirmed working normally.
Click to expand...
Click to collapse
Many thanks.
Thank you! TWRP is working fine!
Stupid me flashed before I installed the Android 10 OTA, so I had to temporarily go back to stock recovery. Unfortunately beamingbadger's method didn't work for me.
This is how it worked for me:
Download the OTA via Lenovo's "Rescue And Smart Assistant"
The stock recovery image will be in the Download folder (default path: C:\ProgramData\LMSA\Download\RomFiles) called "recovery.img"
Flash the recovery.img the same way as you would with the twrp img (adb reboot bootloader -> fastboot flash recovery recovery.img)
fastboot reboot
Install OTA
Flash TWRP recovery + Magisk again (follow the steps from the first post, skip bootloader unlock)
The method I use to install OTAs is:
open Magisk App
select "Uninstall Magisk", then the "Restore Images" option
reboot to Android (you will have no root access and stock recovery is restored)
apply OTA
re-flash twrp and install Magisk
NOTE 1: if you've unencrypted your data partition, it will be re-encrypted by this process.
NOTE 2: the new Magisk App (v22) can be installed in TWRP by renaming the *.apk to *.zip. See the new install instructions.
What's involved with running gsi ROMs on this device? It's got the same SoC as my Samsung Tab, which runs them well, so I'm assuming that this tab will also, but I'd like to know if there are any traps that I need to be aware of.
I can partly answer my own question. It all went more smoothly than I expected: installing TWRP, Magisk and then LineageOS R Mod //LiR, followed by Disable_Dm-Verity_enfec.zip.
If I want to try other GSI ROMs, do I need to flash stock before trying another one? I've had some trouble doing that (won't boot) and it's possibly to do with encryption.
Heeni said:
I can partly answer my own question. It all went more smoothly than I expected: installing TWRP, Magisk and then LineageOS R Mod //LiR, followed by Disable_Dm-Verity_enfec.zip.
Click to expand...
Click to collapse
That's great news. Well done.
Heeni said:
If I want to try other GSI ROMs, do I need to flash stock before trying another one? I've had some trouble doing that (won't boot) and it's possibly to do with encryption.
Click to expand...
Click to collapse
On my X605F I do this in twrp for a new GSI install:
format (not wipe) data partition. This is the option where you have to confirm by swiping.
factory reset. This clears the caches.
restore the stock boot and vendor partitions (from a backup I made). This is because Magisk can touch these partitions.
install the GSI system image
install anything else I need like disable_Dm-Verity, Magisk, gapps etc
I don't know what LOS R Mod //LiR does to your system. If it touches any other partitions, you should restore those to stock too.
Thanks for that. It gives me something to go on with. I've downloaded the stock ROM from lolinet, so I can grab the boot and vendor images from that.
I was able to try a couple of other GSI ROMs and I've settled on AndyYan's LineageOS 17.1 for now. The only serious installation issue I had - which I can laugh about in hindsight - was thinking I'd got myself into a very bad bootloop, when all I needed to do was let go of the power button after the Lenovo logo appeared.
On this tablet, there is no navigation capability at all (no navbar, no gestures, no setting to configure them) on installation, and I have to set it using adb. I suspect it goes back to PHH basic ROMs, but I don't feel like doing yet another install and testing right at this moment. Is this happening on the other tablets that you're testing, or is it unique to this one?
I just posted the v3.5.1 update to twrp.
It's also changed to landscape mode, as many of you requested.
Quick question, how do i apply new system updates with twrp installed? Should i not bother? Also, i forgot how to block check for updates!
will this allow flashing of stock roms download from lenovo recovery? ive been stuck on an ancient android 9 version because the ota updater fails.

[ROM][SM-T500] Samsung Galaxy Tab A7 10.4 (2020) - LineageOS 18.1

Update: March 24 2022: This ROM has been retired and a new one based on LOS 19.1 (and TWRP based on Android 11) have taken its place. New thread here: https://forum.xda-developers.com/t/...4-2020-lineageos-19-1-and-twrp-3-6-1.4421365/
---
Update 9:46am EST July 15 2021: new builds of TWRP and LineageOS with TWRP touch fixed and LOS w/ space for Gapps is now live.
WARNING: USE AT YOUR OWN RISK.
I have successfully ported TWRP and Lineage OS 18.1 to the Samsung Galaxy Tab A7 10.4 (2020), aka SM-T500. This is my first time porting TWRP or LOS, so there may be issues unknown about at this time. Thus far, the only known issue is that the touchscreen in TWRP does not work. This can be worked around by using a USB mouse and/or accessing the device via ADB.
Here are the steps to follow:
Update your device to the latest stock ROM (as of this writing) either using the built-in system updater or via Odin. You want the build that ends with "3BUF3".
Unlock device bootloader using instructions from other threads. This will wipe your device.
Boot into download mode and flash "vbmeta_disabled_R.tar" via Odin in the "Userdata" slot to disable verified boot. This will wipe your device again.
Boot device back into download mode and flash TWRP via Odin in the "AP" slot. If you boot up into the stock ROM rather than booting directly back into download mode then go through the initial setup process of the stock ROM and enable developer tools and ensure OEM Unlocking is still enabled (VaultKeeper can possibly undo OEM Unlocking if you get to the ROM but don't go into Developer Tools and view OEM Unlocking is enabled, so make sure to do this).
Boot device into TWRP (recovery mode) and format (not wipe) your data partition. Then reboot back into TWRP.
Push LineageOS (super.new.ext4.img) to device. Ideally push it to an SD card formatted with ExFat or EXT2/3/4 (FAT/FAT16/FAT32/VFAT won't work due to file-size limitations).
Install LineageOS image to "Super" partition. Make sure to select "Install from Image" in order to show .img files in the install selector screen.
(Optional) Push NikGapps Omni to your device and install the zip. Make sure you include a "nikgapps.config" file in your "/tmp" folder that is configured to install to "system" rather than "product" or "default".
Reboot to system. You should now be in LOS with Gapps.
(Optional, but recommended): Install Magisk via TWRP
(Optional, but recommended): Run fix script to fix brightness slider not working and to make Magisk work. If you didn't install Magisk but only want the brightness fix, just enter "n" when prompted in the script. To run the script:
NOTE: Script has .txt file extension to allow hosting on AFH. Remove that so it's just .sh to match the instructions below.
Download and push to device when booted into TWRP
adb push sm-t500_fixes.sh /tmp
Enter an adb shell
adb shell
Change directories and set permissions
cd /tmp
chmod +x /tmp/sm-t500_fixes.sh
Run script
/tmp/sm-t500_fixes.sh
Tips:
If you are not seeing all of your storage space in the OS on the internal flash, boot to TWRP and format data.
Flash TWRP via "AP" slot and flash VBMeta_Disabler via "Userdata" slot in Odin.
Flash LineageOS as an Image, not as a Zip.
For Gapps, use the latest NikGapps for ARM64 and Android 11/R.
For Gapps, make sure you install to the System partition and not Product. To do this you need to slightly modify a nikgapps.config file. Instructions on that can be found on the NikGapps site.
Downloads:
LineageOS 18.1 20210615 Beta 2: https://www.androidfilehost.com/?fid=14943124697586369438
TWRP 3.5.2 Beta 3: https://www.androidfilehost.com/?fid=14943124697586369439
vbmeta_disabled_R: https://www.androidfilehost.com/?fid=14943124697586369440
Fixes for brightness and Magisk (sm-t500_fixes.sh): https://www.androidfilehost.com/?fid=14943124697586369521
Known Issues:
OS-encrypted storage (Internal Data) not able to be decrypted in TWRP.
Brightness controls don't work: Fixed via "sm-t500_fixes.sh script.
TWRP touch screen doesn't work (use USB keyboard or adb). Should be fixed with TWRP Beta 3.
TWRP formatting external SD card may hardbrick device. Do not do this! Fixed with TWRP Beta 2.
Source (device tree for TWRP from my Github): https://github.com/agreenbhm/android_device_samsung_gta4lwifi
Source (kernel sources from Samsung): https://opensource.samsung.com/uploadSearch?searchValue=Sm-t500#
agreenbhm said:
I have successfully ported TWRP and Lineage OS 18.1 to the Samsung Galaxy Tab A7 10.4 (2020), aka SM-T500. This is my first time porting TWRP or LOS, so there may be issues unknown about at this time. Thus far, the only known issue is that the touchscreen in TWRP does not work. This can be worked around by using a USB mouse and/or accessing the device via ADB.
Here are the rough steps to follow:
Unlock device bootloader using instructions from other threads.
Patch stock ROM (AP) using Magisk, then flash rooted ROM. Will likely need to wipe device after this.
Boot into rooted ROM and ensure "OEM Unlocking" is still enabled in "Developer Tools".
Boot back into download mode and flash "vbmeta_disabled_R.tar" to disable verified boot.
Boot device back into rooted stock ROM to ensure things are still functional (may require a device wipe at this step).
Boot device into download mode and use ODIN to flash TWRP recovery.tar file via "AP" slot.
Boot device into TWRP to verify functionality (hold Vol-Up + Power during boot).
Access TWRP via adb using "adb shell" or with USB mouse (touch functionality currently not working).
Format data partition on device.
Via ADB shell: twrp format data
Via USB mouse: Wipe -> Advanced -> Format Data
Boot device into download mode.
Via ADB shell: twrp reboot download
Via USB mouse: Reboot -> Download
Flash LineageOS tar file via ODIN using the "AP" slot.
If device boots into TWRP after flashing LineageOS, use USB mouse to select: Reboot -> System
Device should boot and stall for ~1m at the Samsung logo screen with red text below, then should go blank and then display LineageOS boot image.
Downloads:
LineageOS 18.1 20210615 with TWRP 3.5.2: https://mega.nz/file/vMVglThZ#TepIHvdEypezq3z4S_4Lln7FRFVfC7CUjVGq3ByFb6U
TWRP 3.5.2: https://mega.nz/file/GYU1yCCQ#JsthI8BYNtfB08Pzt1eeXta2Lb1zCkUI185Zm88dEW4
vbmeta_disabled_R: https://mega.nz/file/iMFx3CQI#8cP4mPoRaQNwDATqt0vKD8wxqRWSTz1EL79U0fNpW8M
Click to expand...
Click to collapse
Great news!! But I think you need to post it in the ROMs, Kernels, Recover thread.
awesome. Will try after work. Also I think you posted in the wrong section.
Which slot to flash the vbmeta?
wizzdome said:
Which slot to flash the vbmeta?
Click to expand...
Click to collapse
AP
Thanks,
After flashing the vbmeta it booted into recovery automatically after what looked like a bootloop in progress, so I wiped with factory reset and then it rebooted fine. (still not sure exactly what the vbmeta does I was hoping it would make it so i didnt get that stupid pop up asking me to hit power button to continue booting due to it having the patched os) anyhow booted fine and twrp installed as you stated without touch screen but mouse with otg works fine. (great job so far) On to LOS... I think I should have checked oem lock before flashing LOS as when I installed I get stuck at boot screen that says oem lock is on... must have been from my factory reset... (facepalm)
Nope... Still sticking on boot with the following showing on the screen...
RPMB fuse not set
RPMB Provisioned
Current BInary: Custom (0x30f)
FRP Lock : OFF
OEM Lock : ON (U) {this was off verified before flash}
KG Status : Checking
Waranty Void : 0x1 (0xE02)
Quallcomm Secureboot : Enable
RP SWREV : B3 (1,1,1,3,1,1) k3 s3
secure download : enable
grdm status : normal (d0000501)
did : 041ce2d22dba
this is displayed in the corner on the bootscreen and looks like it belongs on the download screen, anyhow booting into twrp from this point works however factory reset fails with unable to mount key(something and key(something else) i figure i will let it sit a while as I know sometimes it just takes first boot a while to go through however it doesnt seem to be the problem. Have you had a positive install of the LOS? I am wondering if I had maybe gotten a bad copy of the file. When i go to install I get a pass in odin so not quite sure where to go from here other than back to the factory image any help to get this going would be great... I took on this task cause i needed someting to take my mind off the severely crappy week I have had... so looking forward to anything you can share here...
Actually, userdata is the slot I always use. It might work in both though.
Something to mention: there is not enough space on the /system partition to flash Gapps. I created a build that supports it (with a resized /system partition) but I couldn't get it to flash via Odin. The only way I got it to work was by flashing it via TWRP as an img file. I will be posting that soon. Unfortunately that will be the end of development for now as I hard-bricked the device and need to wait for a repair or replacement. Should be back developing in 2 weeks.
Nevermind what I said here.
jayzarry84 said:
Anyone get this to work? I just flashed the TWRP part but have not been able to get into TWRP
Click to expand...
Click to collapse
Get adb access in the OS and then run "adb reboot recovery"
agreenbhm said:
Get adb access in the OS and then run "adb reboot recovery"
Click to expand...
Click to collapse
question. I don't have an OTG cable and TWRP keeps booting. I've tried rebbot, rebbot bootloader, reboot system. any advice?
jayzarry84 said:
question. I don't have an OTG cable and TWRP keeps booting. I've tried rebbot, rebbot bootloader, reboot system. any advice?
Click to expand...
Click to collapse
You may need to get an otg cable for a USB mouse and choose "reboot system" from the gui. Alternatively, look at the /dev/block/by-name/misc partition and try blanking that out with dd. That has worked sometimes.
jayzarry84 said:
question. I don't have an OTG cable and TWRP keeps booting. I've tried rebbot, rebbot bootloader, reboot system. any advice?
Click to expand...
Click to collapse
Also, from an adb shell, try "twrp reboot". Supposedly that should boot to system, but I feel like in testing I got mixed results. According to the TWRP documentation though that should be the answer.
agreenbhm said:
Also, from an adb shell, try "twrp reboot". Supposedly that should boot to system, but I feel like in testing I got mixed results. According to the TWRP documentation though that should be the answer.
Click to expand...
Click to collapse
Not working. I'll wait for my otg cable to come in
jayzarry84 said:
Not working. I'll wait for my otg cable to come in
Click to expand...
Click to collapse
I was able to use adb to run the TWRP Format Data command and it rebooted the tablet and now LOS has booted up. I think I'm good!
Looking forward to see how this develops
Rom is fast and snappy. Brightness control does not work. I haven’t played too much because of work but that’s what I’ve found so far
Can a mod move this to the rom release section?
agreenbhm said:
Something to mention: there is not enough space on the /system partition to flash Gapps. I created a build that supports it (with a resized /system partition) but I couldn't get it to flash via Odin. The only way I got it to work was by flashing it via TWRP as an img file. I will be posting that soon. Unfortunately that will be the end of development for now as I hard-bricked the device and need to wait for a repair or replacement. Should be back developing in 2 weeks.
Click to expand...
Click to collapse
I've not been able to flash this yet but I know that the latest TWRP versions have a way to fix the system partition to accept gapps. /Wipe/Advanced check system then resize. Sometimes you have to do it more than once if it is a large gapps.
lewmur said:
I've not been able to flash this yet but I know that the latest TWRP versions have a way to fix the system partition to accept gapps. /Wipe/Advanced check system then resize. Sometimes you have to do it more than once if it is a large gapps.
Click to expand...
Click to collapse
I will look into that, but I'm not optimistic it will work. This device does not separately present the system partition, rather it uses a super partition which contains system, vendor, product, and odm. TWRP only shows me the super partition for working with. I was able to resize the system partition by expanding the Lineage image and file system on my pc to match the original stock system partition, then rebuilt the super image with the other partitions it needs.

Categories

Resources