Android S GSI (System-As-Root) on on Smart Tab M10 (TB-X605F) - Thinkpad Tablet General

Preface: After trail and error on installing Android GSI ROMs to my TB-X605F, I successfully made it after reading this thread written by @Yahoo Mike, which is also of great significance for my research. Generalizing it to the newer version Android-Installing and the other partition architectures, I finally drew a conclusion on how to install Android S GSI (System-As-Root) on on Smart Tab M10 (TB-X605F).
Credits:
    @AndyYan, builder of the GSI images which was used in this project.
    @erfanoabdi, developer of MakeMeSar patch.
    @phhusson, developer of phh project treble ROMs.
    @Yahoo Mike, illuminator of installing GSI on this device.
(Sorted alphabetically)
  In this article, I'll introduce the way to install Android S GSI ROMs on the Lenovo Smart Tab M10 (I've only tested it on TB-X605F since I got one at hand. Theoretically, the other tablets in this series, such as TB-X605L should also work). Broadly speaking, this is a generalized method to install all System-As-Root GSI ROMs on this device, but I haven't tested it with the other kinds of ROMs. So, before we start, make a full backup of your device, which'll prevent you from lose all your important data after formatting your device. Also, you'd better to get knowledge of what you're doing and what you're going to do. This project is currently experimental, which means you may brick your device at any time, which is at your own risk.
  Here are the steps.
1. Restoring Stock Android Pie Firmware with EDL.
  1.1. Download the stock pie firmware from https://mirrors.lolinet.com/firmware/lenovo/Tab_M10/TB-X605F/.
  1.2. Assume that you've backed your device up, if not, do it now. Then, reboot it into EDL mode. There're many ways to do it, power it off and press Vol+ and Vol-, connect it with the PC at the same time. If you have TWRP installed in it, you can also get your device into TWRP and press "Reboot->EDL". Or you can reboot it into fastboot mode and use this command:
fastboot reboot edl
Click to expand...
Click to collapse
If your device is unfortunately in "brick" status or your system cannot do such operations for certain reasons, you can open the back case, short these two test points shown in the picture. and connect it with your PC.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
  1.3. Flash the firmware into your device via QPST or QComDLoader.
2. Installing TWRP.
  2.1. Download the TWRP from https://twrp.me/lenovo/lenovo_X605F.html. Currently, I'm using ver 3.6.0.
  2.2. Unlock the bootloader.
  2.3. Reboot your device into fastboot, and
fastboot flash recovery path/to/twrp/img
Click to expand...
Click to collapse
  2.4. Reboot into TWRP by pressing Vol+, Vol- and Power.
3. Getting Files Prepared.
  3.1. We aim to install Android S GSIs on this device, @phhusson's GSIs are a good choice, you can find them at Project Treble GSI images. Currently, I use the LineageOS 19.0 built by @AndyYan as example. I got it here: https://sourceforge.net/projects/andyyan-gsi/files/lineage-19.x/.
    IMPORTANT: As we all know, this device use A-only partition architecture and no System-As-Root support, which is originally not supported by Android S. As a result, we're going to patch it to run Android S. As a consequence, when you're chose ROMs, download the ROMs which're ARM64 A/B Vndklite (arm64_bvS-vndklite) to match the patched device.
  3.2. Download the System-As-Root patch which makes the device support System-As-Root. This patch called MakeMeSar, made by @erfanoabdi. You can find it here: https://androidfilehost.com/?fid=4349826312261728344. This patch will rewrite your boot partition to support System-As-Root, as a result, all the changes you've applied to the boot partition (such as magisk root or supersu root) will be gone.
  3.3. Download the Disable_Dm-Verity. This is a patch to get rid of dm-verity and to disable the Verified Boot, which'll disable force encrypt of userdata partition and prevent the TWRP from being raplaced with the stock recovery. Get it here: https://zackptg5.com/android.php#disverfe.
  3.4. Download the modify_phh_gsi.sh made by @Yahoo Mike. On conscious that it has trouble in mounting system when the device was patched to support System-As-Root, I modified the script to support (only) System-As-Root. Get it here: https://github.com/JunASAKA/modify_phh_gsi_sar.
4. Flashing
  4.1. Boot into TWRP.
  4.2. Format userdata partition and transfer all related files into your device.
  4.3. Flash MakeMeSar patch.
  4.4. Flash Dm-Verity patch.
  4.5. Flash Android GSI ROMs. You can also do this in fastboot mode:
fastboot flash system path/to/gsi/img
Click to expand...
Click to collapse
  4.6. Reboot into TWRP again (Simply press Reboot->Recovery in TWRP).
  4.7. Resize2fs system and run the modify_phh_gsi_sar.sh in terminal. Firstly, press "Wipe->Advanced Wipe->Select system->Repair or Change File System->Resize File System" in twrp before using the script. Tnen, in the terminal:
sh path/to/modify_phh_gsi_sar.sh
Click to expand...
Click to collapse
  4.8. Format userdata partition again to clean up (You can skip this step if you commit no change to userdata partition).
  4.9. Reboot to system (In TWRP, press Reboot->System).
5. Your device will boot into the System you flashed if everything goes well. Enjoy !
fin. Here are the screenshots of Lineage OS 19.0 installed.
ps. Known Issues.
  1. The system may mistake the tablet for "emulated device".
  2. Cannot decrypt userdata even if the Dm-Verity was installed.
Further research is on going.
  For other things regarding the GSI ROMs, such as GAPPS and Magisk root, it's strongly recommend to read this thread written by @Yahoo Mike.

浅香ジュン said:
ps. Known Issues.
  1. /system_root cannot be mount in TWRP.
  2. Cannot decrypt userdata even if the Dm-Verity was installed.
Click to expand...
Click to collapse
Sounds like TWRP will need to be modified for SAR devices.
My first guess is that the fstab needs to be updated to add a mount for /system_root. And the BoardConfig.mk needs some extra entries for the A12 keymaster to work (PLATFORM_VERSION and PLATFORM_VERSION_LAST_STABLE).
If you DM me the fstab from your patched boot.img, I'll build you a modified twrp on the weekend.
Hopefully, we can use the same TWRP for SAR and non-SAR tablets.

After modifing to SAR, any problems using LMSA to restore the tablet back to stock ?

Yahoo Mike said:
Sounds like TWRP will need to be modified for SAR devices.
My first guess is that the fstab needs to be updated to add a mount for /system_root. And the BoardConfig.mk needs some extra entries for the A12 keymaster to work (PLATFORM_VERSION and PLATFORM_VERSION_LAST_STABLE).
If you DM me the fstab from your patched boot.img, I'll build you a modified twrp on the weekend.
Hopefully, we can use the same TWRP for SAR and non-SAR tablets.
Click to expand...
Click to collapse
Well, I think I found the solution to system-mounting. After flashing the system.img, before executing the modify_phh.sh, Go to ”Wipe->Advanced Wipe->Select system->Repair or Change File System->Resize File System”. And then execute the modify_phh.sh. This way, the system can be successfully mount. Just press “mount” in twrp and select system, the /system_root and /system will be mount automatically. Consequently, I think the fstab of TWRP version 3.6.0 is all set and needn’t to be modified, it can automatically detect whether the device is SAR or not.
Yahoo Mike said:
After modifing to SAR, any problems using LMSA to restore the tablet back to stock ?
Click to expand...
Click to collapse
As to restoration, I haven’t try LMSA yet, I always use EDL mode for restoration. But since the MakeMeSAR patch will only make differences to boot partition, I think LMSA should also work, but I haven’t tested it yet.
Additionally, there is another problem that there is “About Emulated Device“ shown in settings main page instead of “About Tablet”. I am wondering why the ROM mistake my tablet for a emulated device? I tried to add
ro.build.characteristics=tablet
Click to expand...
Click to collapse
to build.prop both in vendor and system partition, but it seems to be of no avail.
I am making further researches on that and data partition decryption.
Thanks for your help, I’ll update my post later.

浅香ジュン said:
Well, I think I found the solution to system-mounting. After flashing the system.img, before executing the modify_phh.sh, Go to ”Wipe->Advanced Wipe->Select system->Repair or Change File System->Resize File System”. And then execute the modify_phh.sh. This way, the system can be successfully mount.
Click to expand...
Click to collapse
Resizing in TWRP just runs resize2fs. The script does that. Maybe it's the order the commands are run in? Or maybe the command needs to be run against a different partition for SAR? The script currently only checks for /system.
浅香ジュン said:
Additionally, there is another problem that there is “About Emulated Device“ shown in settings main page instead of “About Tablet”. I am wondering why the ROM mistake my tablet for a emulated device?
Click to expand...
Click to collapse
Is that how MakeMeSAR works? I couldn't find any documentation about it. Unpacking the RAM cpio in MakeMeSAR might hold the answer.
You might also find a hint in the phh GSI or AOSP code. There will be a test that results in "Emulated Device". Whatever the conditions of that test are, they will point you in the right direction.

Yahoo Mike said:
Resizing in TWRP just runs resize2fs. The script does that. Maybe it's the order the commands are run in? Or maybe the command needs to be run against a different partition for SAR? The script currently only checks for /system.
Is that how MakeMeSAR works? I couldn't find any documentation about it. Unpacking the RAM cpio in MakeMeSAR might hold the answer.
You might also find a hint in the phh GSI or AOSP code. There will be a test that results in "Emulated Device". Whatever the conditions of that test are, they will point you in the right direction.
Click to expand...
Click to collapse
Yes, that may helpful to find out more information about SAR in this device, I’ll test the Phh GSI today.

Hi really impressed by the work being done here,always wanted to try out a12 doing it now btw can i use any pixel gsi with this or maybe anyway that the new android 12L gsi works on this tab as it is optimized for large screen devices

FrontMan69 said:
Hi really impressed by the work being done here,always wanted to try out a12 doing it now btw can i use any pixel gsi with this or maybe anyway that the new android 12L gsi works on this tab as it is optimized for large screen devices
Click to expand...
Click to collapse
I think most of the phh-gsi based ROMs, Pixel Experience included, should work fine. As to Android 12L, it’s worth a try!

浅香ジュン said:
I think most of the phh-gsi based ROMs, Pixel Experience included, should work fine. As to Android 12L, it’s worth a try!
Click to expand...
Click to collapse
Thanks! keep up the good work

浅香ジュン said:
I think most of the phh-gsi based ROMs, Pixel Experience included, should work fine. As to Android 12L, it’s worth a try!
Click to expand...
Click to collapse
hi tried the pixelexperience gsis they seem to not flash show not enough storage available
maybe its a device specific restriction

FrontMan69 said:
hi tried the pixelexperience gsis they seem to not flash show not enough storage available
maybe its a device specific restriction
Click to expand...
Click to collapse
Well, that’s because the system partition is not big enough to install pixel experience. But you could try to re-partition the tablet with the “parted”. Just delete the original system partition and create a new one bigger, I used to re-partition my Huawei mobile when installing custom GSIs.

浅香ジュン said:
Well, that’s because the system partition is not big enough to install pixel experience. But you could try to re-partition the tablet with the “parted”. Just delete the original system partition and create a new one bigger, I used to re-partition my Huawei mobile when installing custom GSIs.
Click to expand...
Click to collapse
hi sorry for the ping but i cannot install gapps with los nikgapps installs but play store doesnt show up and bitgapps doesnt install

Update: So far tried Pixel Experience , Octavi,ArrowOS and phh gsis out of all only lineage works no success at install gapps on lineage so far

FrontMan69 said:
Update: So far tried Pixel Experience , Octavi,ArrowOS and phh gsis out of all only lineage works no success at install gapps on lineage so far
Click to expand...
Click to collapse
I'm sorry for hearing that. And according to my experience installing gapps, that's may on account that there is no enough space left in system partition. The best way to solve it is to re-partition the device, which is testing by me. Btw, is there no original gapps installed in Pixel Experience?

浅香ジュン said:
I'm sorry for hearing that. And according to my experience installing gapps, that's may on account that there is no enough space left in system partition. The best way to solve it is to re-partition the device, which is testing by me. Btw, is there no original gapps installed in Pixel Experience?
Click to expand...
Click to collapse
pixel experience doesnt flash saying that there isnt any more storage left in the partition with octavi and arrow i get error 4 in twrp aosp cannot be resized and with los as i said gapps cannot be flashed

I followed the instructions and got vanilla A12 AOSP (squeak) loading.
After boot, is anyone else getting the error message: Android System: there's an internal problem with your device. Contact your manufacturer for details. ?
credstore crashes during init. So that might be causing the error message (?)
As for TWRP, keymaster is crashing. That's why there's no decryption. I'll strace it tomorrow to see if we can get around it.
And I can confirm LMSA restores stock ROM fine after using MakeMeSAR. (BTW, LMSA now uses QFil rather than QComDLoader.)

Yahoo Mike said:
I followed the instructions and got vanilla A12 AOSP (squeak) loading.
After boot, is anyone else getting the error message: Android System: there's an internal problem with your device. Contact your manufacturer for details. ?
credstore crashes during init. So that might be causing the error message (?)
As for TWRP, keymaster is crashing. That's why there's no decryption. I'll strace it tomorrow to see if we can get around it.
And I can confirm LMSA restores stock ROM fine after using MakeMeSAR. (BTW, LMSA now uses QFil rather than QComDLoader.)
Click to expand...
Click to collapse
i tried squeak with go gapps didnt flash also btw big fan mike any working a11 gsis ? also how can i repartition my tablet

Bad news on the TWRP front. There are two issues.
First, the Keymaster key data structure was changed in A12. I can patch TWRP to fix that. Easy!
But the second issue is massive. Keymaster is crashing with "Configure failed" after a KM_ERROR_INVALID_ARGUMENT (-38) error. This is pointing to a version mismatch.
There have been extensive modifications to the TWRP A11 git branch to patch that error. Those modifications have not been made in the A9 branch. Probably because not many people are putting A12 on devices originally released with A8.
We are stuck with stock keymaster blobs from A9. For compatibility reasons, I need to compile TWRP from the A9 branch. It might be possible to use keymaster blobs from a similar A10 device - assuming the kernel needs no modifications. If someone wants to put in the time to get this working, I'm happy to offer you some hints to get you started. You can PR the updates to my github repo. If it works, I'll push them to TWRP gerrit.

Yahoo Mike said:
Bad news on the TWRP front. There are two issues.
First, the Keymaster key data structure was changed in A12. I can patch TWRP to fix that. Easy!
But the second issue is massive. Keymaster is crashing with "Configure failed" after a KM_ERROR_INVALID_ARGUMENT (-38) error. This is pointing to a version mismatch.
There have been extensive modifications to the TWRP A11 git branch to patch that error. Those modifications have not been made in the A9 branch. Probably because not many people are putting A12 on devices originally released with A8.
We are stuck with stock keymaster blobs from A9. For compatibility reasons, I need to compile TWRP from the A9 branch. It might be possible to use keymaster blobs from a similar A10 device - assuming the kernel needs no modifications. If someone wants to put in the time to get this working, I'm happy to offer you some hints to get you started. You can PR the updates to my github repo. If it works, I'll push them to TWRP gerrit.
Click to expand...
Click to collapse
OK, I’ll check it. But I think it seems impossible for me to do that. Anyway, I’ll try my best.

Why can't I use the camera? The camera App stops running when it opens.

Related

Flashtools (MiFlash4Linux, Recovery from QDL/DLOAD, Partition resize)

Introduction
This is a collection of Tools and Resources for Flashing Mi2(s)(c).
MiFlash4Linux
https://github.com/M1cha/aries-image-builder
Core Recovery Package for MiFlash
This is a small package to Recovery MI2 from any bricked state. It has the following advantages over the official ones from Xiaomi:
They don't flash any ROM, just the core system(bootloaders, modem and recovery)
They are small which means both Download and Installation are faster
It directly installs custom Bootloader and TWRP. That means you easily get your device back to a modded status.
Please follow the official MiFlash guidelines for installation with the following differences:
the DLOAD config is called rawprogram_core.xml
the fastboot script is called flash_core.bat(or flash_core.sh for linux)
there's a script called flash_partition_table_and_core which is a alternative to flash_core.bat/sh.
It can be used to change the partition table.
USE THIS WITH THE CUSTOM BOOTLOADER INSTALLED BY ONE OF THE CORE PACKAGES ONLY. Xiaomi's bootloader will format your whole MMC device. THIS WOULD ERASE YOUR EFS AND YOU CAN'T MAKE CALLS ANYMORE
Changing the partition table
There are multiple packages available:
separated: Xiaomi's original layout with a virtual internal sdcard
separated_single: same as separated but without Dualsystem and bigger system partitions
unified: Xiaomi's new layout with /data/media support
unified_single: same as unified but without Dualsystem and bigger system partitions
unified_single_xiaomi: Xiaomi's version of unified_single
SkiFire13 said:
aries_core_unified_single.zip -> only MIUI > 5.4.x or M1cha's CM12.1 or latest AOSP5 works (only they can see Internal Storage, that now is a virtual sd-card in /data/media/0)
aries_separated_single.zip -> other roms
Click to expand...
Click to collapse
Installation:
Backup all your data(including internal sdcard, and EFS just to be safe)
if you don't use the custom Bootloader yet, flash this package using flash_core.bat/sh first. See the big red warning above for more information
flash the package using flash_partition_table_and_core.bat/sh
boot into recovery(which is TWRP now), recreate the filesystems for all partitions(system,data,cache,sdcard to ext4) in the wipe menu and reinstall your ROM.
Version Information
Bootloader: https://github.com/M1cha/mi2_lk/commits/LA.AF.1.1-02810-8064.0
TWRP: v2.8.7.0
core partitions: aries_images_5.7.16_20150626.0000.4_5.0_cn_a63cddccfa.tgz
Download links for Mobile users:
aries_core_unified_single_xiaomi.zip
aries_core_unified_single.zip
aries_core_unified.zip
aries_core_separated_single.zip
aries_core_separated.zip
XDA:DevDB Information
Flashtools, Tool/Utility for the Xiaomi Mi 2
Contributors
m11kkaa
Source Code: https://github.com/M1cha/aries-image-builder
Version Information
Status: Stable
Created 2015-02-21
Last Updated 2015-07-27
First (as always)
Sent from my A0001
the singleboot packages causes the latest version of CM12 to fail booting because of SELinux enforcing. I'll upload a fixed package asap.
everything has been fixed and is up again.
Pls download everything again(especially MiFlash4Linux if u use that).
i think i will wait util the release of GRUB4Android....
acastrocab said:
i think i will wait util the release of GRUB4Android....
Click to expand...
Click to collapse
the purpose of this thread is not G4A
G4A doesn't allow u to change the partition table. I may publish a simple tool for it though.(so u don't need a computer).
m11kkaa said:
the purpose of this thread is not G4A
G4A doesn't allow u to change the partition table. I may publish a simple tool for it though.(so u don't need a computer).
Click to expand...
Click to collapse
Hey m11kkaa, I'm sorry for the noob question, but where can I download the files for windows? And how should I use them? I can't understand from the OP. Thanks in advantage for your help
MyNameIsKappa said:
Hey m11kkaa, I'm sorry for the noob question, but where can I download the files for windows? And how should I use them? I can't understand from the OP. Thanks in advantage for your help
Click to expand...
Click to collapse
On the top of the page just followed by the title, there is a "Download" tab, you could find the miracle at there ;p
MyNameIsKappa said:
Hey m11kkaa, I'm sorry for the noob question, but where can I download the files for windows? And how should I use them? I can't understand from the OP. Thanks in advantage for your help
Click to expand...
Click to collapse
I can't find the links too, but i saw this link in another thread... http://forum.xda-developers.com/devdb/project/?id=8360#downloads
ancics said:
I can't find the links too, but i saw this link in another thread... http://forum.xda-developers.com/devdb/project/?id=8360#downloads
Click to expand...
Click to collapse
You can see this with a computer only.(Tapatalk doesn't work)
http://puu.sh/gamlY/dd7e4904f9.png
Hey M1cha, thank you! Great job!
I have some issues about the procedure:
1. I am not sure if already had a custom bootloader, so first i'll flash the package flash_core.bat :
- turn on mi2s in fastboot mode
- plug usb, device should appear in miflash(the program should be configured as the photo?)
- and click flash
- reboot phone, enter in fastboot mode again and do the same procedure with flash_partition_table_and_core.bat
Is that right?
It's easy to recreate the ext4 filesystem in TWRP? always used CWM....
m11kkaa said:
You can see this with a computer only.(Tapatalk doesn't work)
http://puu.sh/gamlY/dd7e4904f9.png
Click to expand...
Click to collapse
Oh that's why, I'll download it from a computer, thanks!
Sent from my MI 2S using XDA Free mobile app
@m11kkaa: thnx for the linux tools/scripts, it made my migration from CWM to single-system partition + new bootloader + TWRP easier.
BTW, I just wanted to migrate and keep my current CM11 for the time being. I had to fight a bit with restore from backup because I was not aware of the incompatibility between CWM and TWRP, luckily enough it eventually was sufficient to:
reformat system, data and cache in TWRP
flash the old CWM temporarily and restore boot, system and data
flash TWRP again and make new backups.
Proposal:
It would be good if you can change the heading style of "Installation" in the OP to be the same as e.g "Introduction", because now it looks like part of "Singleboot Partition Layout" section only. It is confusing IMHO.
In my case (i.e. flashing both flash_core.sh and then flash_partition_table_and_core.sh), I had to recreate ext4 FS not only on the system partition in TWRP, but also on the data partition (it could not be mounted and TWRP announced 0 MB size) and eventually also on the cache partition. This seems to contradict the info in OP, part "Singleboot Partition Layout", which mentions that data will be preserved.
@cogano thx for your feedback
it's weird that u had to recreate the filesystems because the positions of these partitions still are the same. I resized system1, modem1 and boot1 to 2KB and system, modem and boot to 2*oldsize-2KB. I checked the offsets and they still are the same.
I have another phone and plan to do the same some time in the next week.
I'll try to avoid the trial&error approach and keep notes between the steps.
P. S. I am quite proficient with Linux administration. However I have to admit that upgrading android devices is usually a risky thing: I would have to read lot of guides - often unclear and confusing - or just give it a go and resolve the problems as they appear. The latter one eventually seems to be faster
cogano said:
I have another phone and plan to do the same some time in the next week.
I'll try to avoid the trial&error approach and keep notes between the steps.
P. S. I am quite proficient with Linux administration. However I have to admit that upgrading android devices is usually a risky thing: I would have to read lot of guides - often unclear and confusing - or just give it a go and resolve the problems as they appear. The latter one eventually seems to be faster
Click to expand...
Click to collapse
thx "parted /dev/block/mmcblk0 p" will help to debug these things.
If you don't have a ROM/Recovery with parted you can reboot to dload from the bootloader which will provide ur whole MMC as a usb drive to your computer.
i didn't see the download tab at first, so i downloaded the whole zip from the github and excuted the ./build.sh in Cygwin. Anyway, it works!
m11kkaa said:
you can reboot to dload from the bootloader which will provide ur whole MMC as a usb drive to your computer.
Click to expand...
Click to collapse
What a great feature!
superiyezi said:
i didn't see the download tab at first, so i downloaded the whole zip from the github and excuted the ./build.sh in Cygwin. Anyway, it works!
Click to expand...
Click to collapse
There's a Download "card" on top.
What are the partitions sizes after flashing the singleboot partition layout?

[Discussion & Guide] OnePlus 5/5T now have unofficial Project Treble by MoKee

(My English isn't very practice. If you have any question reading this post, please feel free to ask. I'll try my best to express.)
## 0. Update: 2018/04/16
Some information I got today:
1. OnePlus is doing a repartition in OP5 Open Beta 8 / OP5T Open Beta 6 (or earlier, who knows). It'll split the 1.5GB "last_parti" partition into a 1.0GB "vendor" and a ~500MB "reserve3" partition while booting the system.
2. Yes, the repartition process was done in system, not during OTA in recovery.
3. The official vendor partition is still unused (not formatted). OnePlus will fill it in a future OTA, said their engineer.
4. I think it won't be conflicted with our "homemade" unofficial Treble. I just tested that the stock H2OS/OxygenOS can run on our homemade partition table.
5. It's very easy to undo the unofficial treble. I'll make an undo flashable zip later (through it's unnecessary in this time).
6. Of course, MoKee now (since 20180417) can run on the official partition table too.
==========
The MoKee ROM is now shipping unofficial Treble update for OnePlus 5/5T since 20180411. As the maintainer, I would like to share some information here.
## 1. How is this possible for OP5/5T?
Project Treble requires 2 keys: a standalone /vendor partition, and fully binderized HALs.
In fact, OnePlus have a 1.4GB unused, unformatted partition "sdf6" on OnePlus 3, 3T, 5 and 5T. This partition was possibly left by the ODM company, OPPO. OPPO R11/R11s series have a simular partition layout with OnePlus, and OPPO really did release an OTA update to enable Project Treble for their products.
The other key is binerized HALs. More specifically, the Camera HAL. The good news is, OnePlus recently released OP5 Open Beta 6 and OP5T Open Beta 4, with all fully binerized HALs, including the Camera HAL.
So as these 2 majar problems were solved. Project Treble is possible.
## 2. How did this come true?
To make Project Treble come true for OnePlus 5/5T, these should be done:
1. All vender-specific blobs should be moved to /vendor
2. Some blobs load config files from /system/etc. Just hex-edit them to load from /vendor/etc instead
3. Label and format that unused sdf6 partition as /vendor - this should be automatically done with an OTA script
4. The kernel should mount sdf6 as /vendor as well
## For users - How to enable Treble for OP5/5T?
The most easy way now is, flash the latest MoKee MK81.0 nightly build with latest TWRP (OP5: http://rom.mk/?device=cheeseburger, OP5T: http://rom.mk/?device=dumpling). The updater script will do the job automatically for you.
It's possible to make a flashable zip contains only the kernel and vendor image, without the MoKee system. But I'm busying on some other features. I'll do it later.
Tested fully works with Phh-treble system image, including:
- Audio
- Camera
- Phone & data
- Bluetooth & Wi-Fi
- Fingerprint
## For developers - How to ship Treblize update with my ROM?
(I'm organizing the patch list, I'll updte this section later)
## Can I flash non-Treble ROMs? How to "undo" this change?
You don't need to undo it, I think. For those non-Treble ROMs, including H2OS and OxygenOS, the /vendor partition is invisible. So you can flash back to any other ROMs at any time you want.
This is good news for us, thank you for your hard working!
So, once we flash the Mokee ROM, will we then be able to flash the other treble ROMs like RR and Lineage?
Skeptico said:
So, once we flash the Mokee ROM, will we then be able to flash the other treble ROMs like RR and Lineage?
Click to expand...
Click to collapse
Of course.
Great job!
Any specific instructions to install this or like a normal install ???
Amanpreetsingh said:
Any specific instructions to install this or like a normal install ???
Click to expand...
Click to collapse
Please, read OP message fully
you are awesome, big thank you from every OP5/5t owner
Damn, Oppo enabled Treble but 1+ didn't
What a shame...
Does this mean that the camera quality will be as good as stock on a custom room?
@chenxingyu If we flash Oxygen OS again on the treblized 5/5T, won't it again repartion the device again and create the sdf6 partition again? Just a doubt.
hemant_jeengar said:
@chenxingyu If we flash Oxygen OS again on the treblized 5/5T, won't it again repartion the device again and create the sdf6 partition again? Just a doubt.
Click to expand...
Click to collapse
No, as the normal update packages don't touch that partition. On the other hand, there's no repartitioning involved - the type, filesystem and mount point of /sdf6 are changed.
hemant_jeengar said:
@chenxingyu If we flash Oxygen OS again on the treblized 5/5T, won't it again repartion the device again and create the sdf6 partition again? Just a doubt.
Click to expand...
Click to collapse
No, Oxygen OS doesn't know there's a partition named sdf6.
First of all appreciate your effort for bringing treble support for op5t.. am currently running xxx ROM and decrypted..questions I have is does blu_spark or codeworkx twrp support flashing system image..also if I flash mokee latest update then will it wipe all my internal storage data..also I read no_verity zip doesn't work so when we go back to other non-treble roms then format data is mandatory..am I right..
Can someone who has already installed a treble gsi try and install oneplus camera apk and see what's happens? Or maybe even gcam? Thanks
Jamie_oppo said:
Can someone who has already installed a treble gsi try and install oneplus camera apk and see what's happens? Or maybe even gcam? Thanks
Click to expand...
Click to collapse
Gcam is crashing..tested and confirmed by a user in the group.. thanks
Can someone post a mirror link. For some reason I cant download from the main site, the countdown disappears at 56 seconds.
This is all I see
cubandanger05 said:
Can someone post a mirror link. For some reason I cant download from the main site, the countdown disappears at 56 seconds.
Click to expand...
Click to collapse
Had the same issue, downloading work on internet explorer on PC so maybe Safari on Mac? Give that a shot
BenisMusical said:
Had the same issue, downloading work on internet explorer on PC so maybe Safari on Mac? Give that a shot
Click to expand...
Click to collapse
Tried bunch of different browsers on my phone, desktop mode and all, but nothing, I'm going to have to try on my laptop tonight. Unless someone posts a mirror link.
Not working on the computer at work ?, getting frustrated ?.

[HOW-TO]Android 8.1 for Z00VD/ZC500TG

Hello people of XDA,
as I promised here, here's a tutorial for getting Android Oreo 8.1 up and running to your device.
NOTE: I DID NOT MAKE THIS TUTORIAL! This is a translated guide from 4PDA by nik-kst. I've also rehosted some of the files on Google Drive so you won't have to register on 4PDA(hopefully).
Code:
[B]Your warranty is now void. [/B]
I am 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 me for messing up your device, I will laugh at you.
Now that the disclaimer is dealt with, let's get on with this tutorial shall we?
First things first, we need to grab a bunch of things:
SP Flash Tool;
MediaTek VCOM Drivers;
The Stock Kernel(it will make sense to you soon!);
Scatter file for repartitioning, drop it inside the stock kernel folder(credit to fca.sjc);
ADB and Fastboot of your choice;
New recovery;
Oreo's Backup, drop it inside a MicroSD card or drop it once you have re-partitioned the device successfully;
Once you have everything setup and extracted, you're ready to go!
First, we gotta go ahead and install VCOM drivers - we won't be able to do anything to our phone without them.
If you're running Windows 8/10, make sure to disable Driver Signature Verification.
Go to Device Manager, click Action at the top and click Add legacy hardware. A new wizard window will appear.
Choose Install the hardware that I manually select from a list(Advanced);
In the next window, choose Show all devices and click Next, then click Have disk...
Then you will be prompted to direct to the driver install info, so click Browse...
Now go to the folder of drivers and select the Setup Information file that's fitting for your computer, x86 for 32-bit and x64 for 64-bit.
You should now find 5 new devices in the list, add them one by one by repeating steps 2 to 6 until you have all of them installed.
Windows might complain about unsigned drivers, just allow their installation and proceed.
If your ports list looks similar to the picture below, then you're set for the next step!
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Next, we'll want to back up the NVRAM partition, because AFAIK, it keeps important unique data about your device such as WiFi, IMEI etc. data.
Note: You may want to take out your MicroSD card and SIM cards prior to this just in case. Also, might be the possible fix if readback for NVRAM fails(needs confirmation).
First, open up Flashtool.exe as admin and go to Readback tab;
Click on Add, a new item in the list will appear. You want to double-click on it, so that a Save File window would appear.
Save that file anywhere you want, name it whatever you like, for convenience I've named mine ROM_NVRAM.
Now, you'll want to find the address in the memory for NVRAM partition. To do this, open up the stock firmware(credit to fca.sjc) scatter file in a text editor(like Notepad++), and find line partition_name: nvram
In that paragraph, find two values: linear_start_addr and partition_size they should be 0x380000 and 0x500000 respectively.
Punch in those values into the Readback block start address window, so it should look something like this:
Now, click Read Back, it should gray out along with Add and Remove.
Now, turn off your device, pull out the battery for about 30 seconds, reinsert it and DO NOT TURN IT ON YET! With the Volume Down "-" button pressed, plug in your device into the USB port.
The NVRAM partition should've been read and you'll get a giant green tick sign when it's done.
Now that that's done, we can start repartitioning our device.
Make sure your SP FlashTool is running as admin, otherwise restart it as admin.
Open up the Download tab and in the line Scatter-loading File click Choose and navigate to the 8.1 scatter file, it should be named MT6580_Android_scatter_8.1.txt.
From the dropdown list, select Format All + Download.
Again, take out the battery for 30 seconds and put it back in WITHOUT turning it back on.
Now click Download, and with the Volume down "-" button held down, plug the device into your PC. There should be a bunch of colored progress bars at the bottom of the window.
Once it's done, you should get the giant tick pop-up, after which you can disconnect the device, and start it normally.
NOTE: it takes a while for the first launch, so give it some time!
Once it starts up into the first launch wizard, we can now restore the NVRAM.
In order to activate the memory writing function of SP FlashTool, re-start it with admin and press Ctrl + Alt + V, the window header should have (Advanced mode) now.
From the Window drop-down, select Write Memory, it should redirect you to a new tab named accordingly.
In the File Path field, browse to the ROM_NVRAM backup that you made earlier.
In the Begin Address (HEX) field, copy the linear_start_addr value off the scatter file.
The region should be left at EMMC_USER.
Now, click the Write memory button, turn off the device, re-insert the battery just like before, and connect the device with the Volume Down "-" button pressed.
It should begin the writing of the NVRAM and once it's done a giant tick pop-up will appear.
Now after that is done, boot into the OS, check that everything works, including IMEI and WiFi.
Also, during the setup wizard or later in the settings setup a screen lock with a pattern or a PIN or a password(credit to fca.sjc), because the partitions may remain encrypted and show 0mb(needs confirmation)
Now you'll want to unlock the bootloader and flash the TWRP recovery.
Now this is a standard recovery flash, but for a quick summary:
Enable Developer options;
Enable OEM unlocking;
Reboot into bootloader mode(I like to use ADB for adb reboot-bootloader);
Make sure your device is detected via fastboot devices, if not, google some drivers for ADB;
Unlock the bootloader via fastboot oem unlock, and press the Volume up button to confirm the bootloader unlocking.
Now, reboot the phone, it will take a while to reboot, DO NOT PANIC AND WAIT.
Now that we have bootloader unlocked, we can flash the TWRP:
Go into bootloader mode;
Confirm you are being detected again by fastboot devices;
Flash the recovery with fastboot flash recovery [twrp recovery name].img;
now, WITHOUT booting into system we boot into recovery and confirm it works.
Now that you've done all this, you propably want to run Oreo now, eh? Well, here's what we do now:
Note: make sure you have the Oreo's backup zip extracted at it's own folder inside your MicroSD card or inside the phone's internal storage by now(thanks @ZappaDong for letting me know)
From recovery, select Wipe > Advanced Wipe and select system and vendor, and wipe them. Logs may complain about not seeing vendor, ignore that message.
Then, we restore everything from the Oreo backup;
Finally, do a factory reset(aka wipe Data, Dalvik and cache);
And reboot!
Now, fingers crossed, you should be booting into a fully functional 8.1 Oreo! if you did, congratulations!
Please let me know if I've made any mistakes and/or this has worked for you.
All credits go to the awesome people at 4PDA, especially nik-kst(if you're reading this, you the real MVP!), below I've linked the sources I've written this guide from.
Nik-kst's guide to repartitioning the device for Oreo;
Nik-kst's post about the Stable Oreo ROM.
Reserved for possible FAQ in the future
@aurismat, Hey man it worked as expected ! However, I was a bit confused on the repartitioning part when selecting ''Format all+download'' option then clicking ''start'' will only give an error stating that the IMG file of ''vendor'' is missing. (I am using SP FLASH v5.1744)
But nevertheless, I tried the ''Download only'' option and lucky it worked as well. I just wanted to clarify should it be Format all +download or Download only? Or is there a missing corresponding IMG file for vendor ?
Hey @JustAnormalGuy,
It should've been Format All + Download.
Also I'm glad that my post has helped at least one person.
Thanks for pointing out this omitted detail though, I'll edit the post ASAP.
Thanks for the translation!
--- solved ---
I have tried it three times but never managed to back up the NVRAM partition.
Error: s_dl-get_fram_setting_fail (5054) see attached screenshot
-----------
I have used Win 10 on my Mac and it worked.
Now I am stuck at step "5. Unlock the bootloader via fastboot oem unlock, and press the Volume up button to confirm the bootloader unlocking."
this looks O.K. to me
----------------------------------
>fastboot oem unlock
...
(bootloader) Start unlock flow
OKAY [ 16.047s]
finished. total time: 16.047s
-----------------------------------
But now nothing happens after
-----------------------------------
> fastboot reboot
rebooting...
finished. total time: 0.000s
-----------------------------------
It's stuck in
[Fastboot Mode] <<==
=> FASTBOOT Moe ...
and nothing happens.
UPDATE
O.K. I have used the Power Button to switch it off and on again, there was a small Android for a few seconds and the phone rebooted the second time. Now I am waiting for it to finish booting.
UPDATE 2
TWRP is working now
And what TWRP.img should I use for
"3. Flash the recovery with fastboot flash recovery [twrp recovery name].img;"
in the next paragraph? Is this the "New recovery;" from the download section at the top?
Thank you!
Missing tips:
- Put both scatter files inside the stock kernel folder before starting.
-I used the stock scatter file for the NVRAM backup then the 8.1 scatter only for the Formal all+Download step.
- When you first run the stock ROM, set up a pin or a password, otherwise you will have failed to mount data in twrp and data will show as 0mb due to its encryption.
@aurismat does that WW file includes the new vendor release?
In the vendor, a bug was detected, the camera with the auto flash turned on, did not turn on (rather, it turned on and off immediately), the flash when shooting video.
Now everything works as it should: yes2:
Fixed vendor: 07/07/2018
https://yadi.sk/d/DUGRYLnc3YtADV
I did everything according with this tutorial. Sadly my mobile network is not connecting idk why. I get an error saying Simprocessor and it doesnt connect on mobile network. It detects the networks but wont connect. Im going back to stock until someone can help me fix it.
@ZappaDong:
Yes, you should use the one I provided the link at the list of downloads.
Also, a bit late and I may be wrong, but your DRAM reads may be hindered by a MicroSD card(confirmation needed). Try ejecting it before you read off the NVRAM.
@fca.sjc:
First of all, thanks for pointing out my missing tips.
I'm not really sure if it includes the fixed vendor. I didn't really have any issues with the camera's flash, so they already included it(?)(again, needs confirmation).
For failed connections, make sure you flashed the NVRAM correctly(hence why you should test the telephony after you've repartitioned to stock 5.0 with the NVRAM backup flashed).If you failed to do that, I was told you should be able to recover the NVRAM data with Maui(?) software(confirmation needed, once again).
Thanks to both of you for pointing out these tips, I'll update the guide and credit you when I'll have more time. Cheers!
[*]For failed connections, make sure you flashed the NVRAM correctly(hence why you should test the telephony after you've repartitioned to stock 5.0 with the NVRAM backup flashed).If you failed to do that, I was told you should be able to recover the NVRAM data with Maui(?) software(confirmation needed, once again).
[/LIST]
Click to expand...
Click to collapse
After repartition, wifi, 3g and mobile signal works fine. I just cant flash twrp after unlocking bootloader otherwise i get a bootloop (unable to mount data and storage). So after i installed twrp and wiped/restore vendor and system, i reflashed stock recovery to acess android and then, restarted again to recovery. At this point, i did the write memory step again, using old vendor and the new vendor. None seem to work. I even backed up NVRAM using TWRP at first to make sure i did it right and tried to restore from there and it doesnt seem to be an IMEI issue. Maybe it has something to do with the frequency. Im on Brazil right now and idk
It does recognize my Sim card, my number, it downloads the data operators and etc but it doesnt connect to the mobile signal idk why. The bug starts at the restore step so it has something to do with this part.
I just test stuff but im pretty experienced at flashing and reflashing, etc. I guess only a dev can help and i actually went back to 7.1 UHANS rom, wich i got from 4pda.ru. Before using this rom, I was having a bluetooth audio stream bug and Ive tested like 4-5 roms, one for each kernel that was there. Lets see if someone can help me with this, cause i want oreo for better bluetooth audio stream.
Thanks for your help so far. I really apreciate it. This device is very good and we dont see many mods here on xda for it.
aurismat said:
@ZappaDong:
Yes, you should use the one I provided the link at the list of downloads.
Also, a bit late and I may be wrong, but your DRAM reads may be hindered by a MicroSD card(confirmation needed). Try ejecting it before you read off the NVRAM.
Click to expand...
Click to collapse
Thanks again!
I am using Windows 10 (bootcamp on the iMac) now and I have read the description in the 'old' [ROOT/TWRP] thread but used the files you have provided.
TWRP is working now, but I got an error that the ZIP file on the SD card was corrupted. Maybe I have damaged it when copying it to the SD card under OS X.
I am just redownloading it with Windows 10 and give it another try. (Yandex is very slow now, about 60 KB/s)
------------------------------------------------------------------
UPDATE
I have downloaded "WW_Phone-user_810_O11019_1528478718_release.zip" again, put in on the SD card, booted into Recovery, wiped system and vendor and chose "Install" , selected the "WW_Phone-user_810_O11019_1528478718_release.zip" file.
But I still get an error message.
Installing zip file '/external_SD/WW ... release.zip'
Checking for digest file
Skipping Digest Check: no Digest file found
[IN RED]Invailid zip file format!
Error installing zip file '/ 'external_SD/WW ... release.zip' [/IN RED]
Updating partion details...
...done
I have just copied the zip file from the download folder to the SD card - have I missed anything?
ZappaDong said:
And what TWRP.img should I use for
"3. Flash the recovery with fastboot flash recovery [twrp recovery name].img;"
in the next paragraph? Is this the "New recovery;" from the download section at the top?
Thank you!
Click to expand...
Click to collapse
Yup that one
@ZappaDong, yeah I kind of forgot to mention again - you should've extracted the .zip in which the backup came in. It's a backup, not an installation zip.
It needs to be extracted into its own folder inside the MicroSD card, so that then it could be used by TWRP to recover the partitions.
Thanks for pointing this out to me though, gonna edit it ASAP.
@fca.sjc bro AFAIK that problem of yours could be because of one or more of the following:
1. Your IMEI is missing or null. I would suggest SN Write tool (since I already tried it). Is quite effective, it is comparable to Maui Meta although I haven't tried it yet. (Tutorial here ==> https://forum.hovatek.com/thread-12306.html )
It is better to use PC restore tools since it writes directly to the nvram unlike apks like Chamelephon which (according to what I know) writes only to nvdata.
2. You need to switch the sims. What i mean is just if you have 2 sims on your phone, switch sim 1 in with sim 2. I forgot the explanation on it but it helps.
3. You need to switch off data connection on the other sim. On the several roms I tried on 4pda including this 8.1 pixel based rom, upon first bootup, the data connection on both sims are already on, therefore 3G cannot work. So first turn both sim's connection off then check if network mode is set to 3G. If not do the Solution #2.
JustAnormalGuy said:
@fca.sjc bro AFAIK that problem of yours could be because of one or more of the following:
1. Your IMEI is missing or null. I would suggest SN Write tool (since I already tried it). Is quite effective, it is comparable to Maui Meta although I haven't tried it yet. (Tutorial here ==> https://forum.hovatek.com/thread-12306.html )
It is the best IMEI restore tool since it writes directly to the nvram. (Meaning it retains even after wipes to data, system etc. via twrp)
2. You need to switch the sims. What i mean is just if you have 2 sims on your phone, switch sim 1 with sim 2. I forgot the logic on how that helps but I've seen it as a solution as the phone rereads the sims.
3. You need to switch off data connection on the other sim. On the several roms I tried on 4pda including this 8.1 pixel based rom, upon first bootup, the data connection on both sims are already on, therefore 3G cannot work. So first turn both sim's connection off then check if network mode is set to 3G. If not do the Solution #2.
Click to expand...
Click to collapse
Thanks for your help bro. I did check the IMEI while i was on this oreo rom. It seem to be ok. Number was there but i did not check if it was the right number. I might check it when i try to flash again. Probably later today when i'm home.
The problem wasnt just data connection, it was the connection itself. I couldnt call or receive SMS to activate whatsapp, for example. Like i said previously, those features were ok after repartitioning (on stock repartitioned). After the restore step, i did check all network options, including data, network mode, network connections available,etc. I'll follow your tutorial to restore the IMEI if the numbers are different then. I'll remember to take some screenshots next time so you guys can help me figure out what the problem is. Thanks again
aurismat said:
@ZappaDongIt's a backup, not an installation zip.
Click to expand...
Click to collapse
Yes, that did the trick. The installation went through and everything seems to work now.
Thank you again for your patience.
I saw there in the forum 4pda that are doing roms project treble pro zenfone go, only that I can not understand the mode of installation, you know how?
Ricardo Flowers said:
I saw there in the forum 4pda that are doing roms project treble pro zenfone go, only that I can not understand the mode of installation, you know how?
Click to expand...
Click to collapse
Yeah, it is possible -
FIrstly you'd need a vendor image that has fixed RIL(telephony) - vendor off this thread's 8.1 has RIL broken in Treble ROMs.
Luckily you can get it off any 8.1 custom ROM off ska-vova in 4pda. Just download any of his .zips(i.e. his ResurrectionRemix ROM(which imo is just official ResRemix with their Russian preference for a browser, but fine)), flash them and then backup the /vendor off it(and /boot for good measure)
Buuuuut then you need a TWRP that supports system image flashing - not sure if the one I provided here has it, if it hasn't - I'll post it here.
Then all you need to do is flash the Treble image, restore the /vendor(and /boot if you need to) and hope for the best!
Sadly the Havoc OS 2.0, the only ARM A-Only Pie-based ROM available here didn't work for me - just straight bootloops.
Your mileage may vary - if you get the Havoc OS 2.0 instaled, I'd love to read about it.
aurismat said:
Yeah, it is possible -
FIrstly you'd need a vendor image that has fixed RIL(telephony) - vendor off this thread's 8.1 has RIL broken in Treble ROMs.
Luckily you can get it off any 8.1 custom ROM off ska-vova in 4pda. Just download any of his .zips(i.e. his ResurrectionRemix ROM(which imo is just official ResRemix with their Russian preference for a browser, but fine)), flash them and then backup the /vendor off it(and /boot for good measure)
Buuuuut then you need a TWRP that supports system image flashing - not sure if the one I provided here has it, if it hasn't - I'll post it here.
Then all you need to do is flash the Treble image, restore the /vendor(and /boot if you need to) and hope for the best!
Sadly the Havoc OS 2.0, the only ARM A-Only Pie-based ROM available here didn't work for me - just straight bootloops.
Your mileage may vary - if you get the Havoc OS 2.0 instaled, I'd love to read about it.
Click to expand...
Click to collapse
Can you do a tutorial? I did not quite understand how it installs. Sorry, google translate does not help.
Deleted

[UNOFFICIAL][PATCHER][APP] DualBootPatcher for Galaxy A5 2017 Exynos

I'm proud to present the first dual boot project for the Samsung Galaxy A5 2017 Exynos version. This project started off as a feature in my ROM, but not anymore. This will allow any number of ROMs to be installed at the same time. It works by patching the secondary ROM's installation scripts and boot image to load the ROM files from an alternate location (/system/multiboot, /cache/multiboot, and /data/multiboot). Because of the way this is implemented, no changes to the primary ROM are necessary.
Donators
A huge thanks goes out to all of the donators for supporting this project! I if forgot to add you (and you want to be added), please send me a quick PM.
See all of our supporters here
It patches...
Custom kernels for dual boot support
ROMs so that they can be installed as secondary
Google Apps packages for AOSP-based ROMs
SuperSU so that it can be used in the secondary ROM
NOTE: If you want to dualboot a TouchWiz ROM, I highly recommend installing TW as the primary ROM. Otherwise, any mods will need to be patched before flashing.
How to use the patcher
Android
Download the patcher apk and run it. Tap "Patch Zip File" from the navigation drawer and choose the file you want to patch.
After patching the zip file, a new file, like some_rom_dual.zip file will be created. For example, patching ktoonsez's
KT-SGS4-JB4.3-AOSP-TMO-08.28.2013.zip
would create a new
KT-SGS4-JB4.3-AOSP-TMO-08.28.2013_dual.zip
Instructions for dual booting
Before doing anything, download the Dual Boot Patcher app and the DualBootUtilities.zip from the download section below.
The patcher offers several locations for installing ROMs:
Primary: This is normally used for installing a zip to the primary ROM. It is not required, but is strongly recommended because it has code to prevent the zip from inadvertently affecting other ROMs.
Dual: Dual/Secondary is the first multiboot installation location. It installs to the system partition. This is a good spot for installing a second ROM because it doesn't take any space away from the internal storage.
Multi-slots: There are 3 multislots: multi-slot-1, multi-slot-2, multi-slot-3. These install to the cache partition. This is specifically for devices, like the Galaxy S4, that have a massive cache partition.
Data-slots: There can be an unlimited number of data slots. These install to the data partition and eat up space on the internal storage. This is useful for devices where the system partition is nearly full and the cache partition is tiny. These slots are named "data-slot-[id]", where "id" is something you provide in the app.
Extsd-slots: There can be an unlimited number of extsd slots. These install to the external SD card, which is useful as it keeps the ROMs off of the internal storage. Note that the ROM's data files are still stored on the data partition.
With that said, let's get to the "how to"!
First, boot into your primary ROM and install the Dual Boot Patcher app
Open the app and go to "Roms" in the navigation drawer. It will ask if you want to set the kernel. Make sure that you do.
Go to "Patch zip file" in the navigation drawer and patch the ROM or zip you want to install. You can select one of the installation locations described above.
Well, Just flash the patched zip file via recovery (Custom Recovery, like TWRP of course)
A normal backup from recovery will backup every ROM. If you would like to back up ROMs individually, please see @rlorange's awesome tool: http://forum.xda-developers.com/showthread.php?t=2491299
How do I...?
Switch the ROM if something doesn't work properly?
You can flash the DualBootUtilities zip from recovery. It will provide a menu interface that allows switching to the various ROMs.
If you have TWRP, you can also switch manually by tapping Install -> Images (bottom right) -> Go to /sdcard/MultiBoot/[Your ROM]/ -> flash boot.img.
Wipe /cache, /data, /system, or dalvik-cache?
The easiest way is to do it from the app while booted in another ROM. Just go to "Roms" in the navigation drawer, tap the 3 dots options menu for the ROM you want to wipe, and tap "Wipe ROM".
Alternatively, flash the DualBootUtilities zip from recovery, which will also allow you to wipe a ROM.
NOTE: Don't use the recovery's built-in wiping abilities as that may delete non-primary ROMs!
Update the primary ROM?
Patch the zip for primary and flash it. The "primary" installation target is designed so that other ROMs won't be affected when you want to flash something for the primary ROM.
Update a non-primary ROM?
Patch and flash the zip exactly like how you did it the first time.
Flash a mod or custom kernel for the primary ROM?
Patch it for primary before flashing. If the zip does not wipe /cache, it is also safe to flash it directly.
Flash a mod or custom kernel for a non-primary ROM?
Just patch and flash it
Downloads
Patcher: Download
Utilities: Download
XDADevDB Information
DualBoot Patcher APP, Device Specific App for the Samsung Galaxy A5 2017 Exynos
Contributors
simon151102
Source Code: https://github.com/chenxiaolong/DualBootPatcher
Version Information
Status: Beta
simon151102 said:
I'm proud to present the first dual boot project for the Samsung Galaxy A5 2017 Exynos version. This project started off as a feature in my ROM, but not anymore. This will allow any number of ROMs to be installed at the same time. It works by patching the secondary ROM's installation scripts and boot image to load the ROM files from an alternate location (/system/multiboot, /cache/multiboot, and /data/multiboot). Because of the way this is implemented, no changes to the primary ROM are necessary.
Donators
A huge thanks goes out to all of the donators for supporting this project! I if forgot to add you (and you want to be added), please send me a quick PM.
See all of our supporters here
It patches...
Custom kernels for dual boot support
ROMs so that they can be installed as secondary
Google Apps packages for AOSP-based ROMs
SuperSU so that it can be used in the secondary ROM
NOTE: If you want to dualboot a TouchWiz ROM, I highly recommend installing TW as the primary ROM. Otherwise, any mods will need to be patched before flashing.
How to use the patcher
Android
Download the patcher apk and run it. Tap "Patch Zip File" from the navigation drawer and choose the file you want to patch.
After patching the zip file, a new file, like some_rom_dual.zip file will be created. For example, patching ktoonsez's
KT-SGS4-JB4.3-AOSP-TMO-08.28.2013.zip
would create a new
KT-SGS4-JB4.3-AOSP-TMO-08.28.2013_dual.zip
Instructions for dual booting
Before doing anything, download the Dual Boot Patcher app and the DualBootUtilities.zip from the download section below.
The patcher offers several locations for installing ROMs:
Primary: This is normally used for installing a zip to the primary ROM. It is not required, but is strongly recommended because it has code to prevent the zip from inadvertently affecting other ROMs.
Dual: Dual/Secondary is the first multiboot installation location. It installs to the system partition. This is a good spot for installing a second ROM because it doesn't take any space away from the internal storage.
Multi-slots: There are 3 multislots: multi-slot-1, multi-slot-2, multi-slot-3. These install to the cache partition. This is specifically for devices, like the Galaxy S4, that have a massive cache partition.
Data-slots: There can be an unlimited number of data slots. These install to the data partition and eat up space on the internal storage. This is useful for devices where the system partition is nearly full and the cache partition is tiny. These slots are named "data-slot-[id]", where "id" is something you provide in the app.
Extsd-slots: There can be an unlimited number of extsd slots. These install to the external SD card, which is useful as it keeps the ROMs off of the internal storage. Note that the ROM's data files are still stored on the data partition.
With that said, let's get to the "how to"!
First, boot into your primary ROM and install the Dual Boot Patcher app
Open the app and go to "Roms" in the navigation drawer. It will ask if you want to set the kernel. Make sure that you do.
Go to "Patch zip file" in the navigation drawer and patch the ROM or zip you want to install. You can select one of the installation locations described above.
Well, Just flash the patched zip file via recovery (Custom Recovery, like TWRP of course)
A normal backup from recovery will backup every ROM. If you would like to back up ROMs individually, please see @rlorange's awesome tool: http://forum.xda-developers.com/showthread.php?t=2491299
How do I...?
Switch the ROM if something doesn't work properly?
You can flash the DualBootUtilities zip from recovery. It will provide a menu interface that allows switching to the various ROMs.
If you have TWRP, you can also switch manually by tapping Install -> Images (bottom right) -> Go to /sdcard/MultiBoot/[Your ROM]/ -> flash boot.img.
Wipe /cache, /data, /system, or dalvik-cache?
The easiest way is to do it from the app while booted in another ROM. Just go to "Roms" in the navigation drawer, tap the 3 dots options menu for the ROM you want to wipe, and tap "Wipe ROM".
Alternatively, flash the DualBootUtilities zip from recovery, which will also allow you to wipe a ROM.
NOTE: Don't use the recovery's built-in wiping abilities as that may delete non-primary ROMs!
Update the primary ROM?
Patch the zip for primary and flash it. The "primary" installation target is designed so that other ROMs won't be affected when you want to flash something for the primary ROM.
Update a non-primary ROM?
Patch and flash the zip exactly like how you did it the first time.
Flash a mod or custom kernel for the primary ROM?
Patch it for primary before flashing. If the zip does not wipe /cache, it is also safe to flash it directly.
Flash a mod or custom kernel for a non-primary ROM?
Just patch and flash it
Downloads
Patcher: https://drive.google.com/open?id=18rN9RqiSWlbwBXPlZzdsXw4W4ZQD2tId
Utilities: https://drive.google.com/open?id=158n-YhyHqjvNfhZJWpFTYWgDIqsIBaaL
XDADevDB Information
DualBoot Patcher APP, Device Specific App for the Samsung Galaxy A5 2017 Exynos
Contributors
simon151102
Source Code: https://github.com/chenxiaolong/DualBootPatcher
Version Information
Status: Beta
Click to expand...
Click to collapse
But, there is official support for our device, what's different in this version?
sheepkill15 said:
But, there is official support for our device, what's different in this version?
Click to expand...
Click to collapse
Ofiicial patcher only supports the A5 2017 with Snapdragon SoC, it wont work on the Exynos version. Basically the only difference is the architecture.
A patched ROM for A5 2017 Snapdragon wont work on A5 2017 Exynos. So heres support for the Exynos version
simon151102 said:
Ofiicial patcher only supports the A5 2017 with Snapdragon SoC, it wont work on the Exynos version. Basically the only difference is the architecture.
A patched ROM for A5 2017 Snapdragon wont work on A5 2017 Exynos. So heres support for the Exynos version
Click to expand...
Click to collapse
I see. I didn't know that
sheepkill15 said:
I see. I didn't know that
Click to expand...
Click to collapse
No problem dude?
Wait, there is a version of the A5 2017 with Snapdragon Soc?
MinwooChong said:
Wait, there is a version of the A5 2017 with Snapdragon Soc?
Click to expand...
Click to collapse
Yeah, the US A5 2017 is powered by a Snapdragon 660. Other countries (like korea, germany, ...) have Samsungs Exynos 7880 instead.
Does it support Oreo and pie ROMs???
iloveoreos said:
Does it support Oreo and pie ROMs???
Click to expand...
Click to collapse
Im able to boot Oreo and Pie ROMs, but I have not tested much ROMs (only tested RR with android 8 and PixelExperience with android 9).
For me they are working without problems
simon151102 said:
Im able to boot Oreo and Pie ROMs, but I have not tested much ROMs (only tested RR with android 8 and PixelExperience with android 9).
For me they are working without problems
Click to expand...
Click to collapse
Cool. Hope I have success with this version.
I just tried pixel experience as the second rom. Failed with error 1 like normal. Is there a certain slot that works better? I usually do ext sd.
iloveoreos said:
I just tried pixel experience as the second rom. Failed with error 1 like normal. Is there a certain slot that works better? I usually do ext sd.
Click to expand...
Click to collapse
I always use data slot, extsd isnt working for me(dont know why).
But make sure you checked the A5 2017 exynos, it normally checks the snapdragon one when patching a zip
Update 13 Feb
Patcher and Utilities built from latest sources with support for A5 2017 Exynos and (because someone in the main DBP thread asked) support for S9 Plus Snapdragon.
Patcher: https://drive.google.com/open?id=1ND...Jh4imaAbgR1Chz
Utilities: https://drive.google.com/open?id=13H...1PlJ6bI8bpydSh
Update
Added a few more codenames (A520W, A520DS)
Patcher: Download
Utilities: Download
Update
Re-compiled the app with a different linker (got some errors before)
Patcher: Download
Utilities: Download
simon151102 said:
Update
Re-compiled the app with a different linker (got some errors before)
Patcher: Download
Utilities: Download
Click to expand...
Click to collapse
Tried with the last update and dual boot app keeps stopping..(force closes)
EDIT:The app force closes only when i press the tab ROMS.
broky said:
Tried with the last update and dual boot app keeps stopping..(force closes)
EDIT:The app force closes only when i press the tab ROMS.
Click to expand...
Click to collapse
Which ROM are you using as primary ROM?
I cant reproduce the error on any of my ROMs.
Sharing logs would be great
simon151102 said:
Which ROM are you using as primary ROM?
I cant reproduce the error on any of my ROMs.
Sharing logs would be great
Click to expand...
Click to collapse
I m using Hades rom V6 for primary.
broky said:
I m using Hades rom V6 for primary.
Click to expand...
Click to collapse
I think this is a ROM-related bug Im not able to fix.
This bug has to be fixed in the sources I guess, and as Im not a programmer, I have no idea how to do this.
Im sorry
Boot loop on a520f after updating ramdisk
After updating ramdisk for primary rom (hadesrom v1.5) phone goes into bootloop.
But lineageos 16 as secondary works well even after updating ramdisk.

HELP! Recommendations for Samsung Galaxy Tab 10.1" SM-P580?

I have a Samsung Galaxy Tab 10.1" SM-P580 and started working to root it so I could install more apps using a micro SD card. It was a long time ago with Android 7 or so and a while back I thought I would upgrade so I tried upgrading it to Android 11 and Lineage 18.1 and bare bones Google apps. This has been only partially successfully as the system runs but I cannot install any apps at all and have been unable to make any further progress. So I am looking to go back to the drawing board here. What recommendations do you have with regard to what to use that will allow me to install more apps? Thank you very much!
JR1979 said:
I have a Samsung Galaxy Tab 10.1" SM-P580 and started working to root it so I could install more apps using a micro SD card. It was a long time ago with Android 7 or so and a while back I thought I would upgrade so I tried upgrading it to Android 11 and Lineage 18.1 and bare bones Google apps. This has been only partially successfully as the system runs but I cannot install any apps at all and have been unable to make any further progress. So I am looking to go back to the drawing board here. What recommendations do you have with regard to what to use that will allow me to install more apps? Thank you very much!
Click to expand...
Click to collapse
I assume you got the basic stuff out of the way - unlocked bootloader, installed TWRP, etc.
Did you install a Gapps package?
If you prefer something more vanilla, without the LineageOS customizations, you can try an Android GSI, which is like turning your device into a Pixel tablet. Check out my guide here.
JR1979 said:
I have a Samsung Galaxy Tab 10.1" SM-P580 and started working to root it so I could install more apps using a micro SD card. It was a long time ago with Android 7 or so and a while back I thought I would upgrade so I tried upgrading it to Android 11 and Lineage 18.1 and bare bones Google apps. This has been only partially successfully as the system runs but I cannot install any apps at all and have been unable to make any further progress. So I am looking to go back to the drawing board here. What recommendations do you have with regard to what to use that will allow me to install more apps? Thank you very much!
Click to expand...
Click to collapse
There are differences between Android 7,8,9 and now, especially eg.the use of sd-cards and permissions for users in general. Maybe you have to check such things as "Allow Installing apps from unknown ressources" in Settings, or you ckeck magisk modules that could help.
abagm said:
There are differences between Android 7,8,9 and now, especially eg.the use of sd-cards and permissions for users in general. Maybe you have to check such things as "Allow Installing apps from unknown ressources" in Settings, or you ckeck magisk modules that could help.
Click to expand...
Click to collapse
Thanks for the input. I have it upgraded to Android 11. Yhe unknown resources shouldn't matter AFAIK, in this case, as I am only trying to install via Play Store. I was trying to work with Magisk - I have it installed. I was going to try the ExSD module but I haven't been able to add it.
V0latyle said:
I assume you got the basic stuff out of the way - unlocked bootloader, installed TWRP, etc.
Did you install a Gapps package?
If you prefer something more vanilla, without the LineageOS customizations, you can try an Android GSI, which is like turning your device into a Pixel tablet. Check out my guide here.
Click to expand...
Click to collapse
Thank you. I will look into that. I will look into what the differences are between that and LineageOS. Question: will the pen/stylus work under this configuration? Thank you again.
JR1979 said:
Thank you. I will look into that. I will look into what the differences are between that and LineageOS. Question: will the pen/stylus work under this configuration? Thank you again.
Click to expand...
Click to collapse
In theory, yes - because GSIs are meant to be used with the stock kernel, and the system image doesn't have to have any specific hardware support.
LineageOS is built from AOSP, with added tweaks and customizations. I used it for a while, but grew tired of the Magisk issues I was having (PHH builds have built in SuperSU) so I just went straight vanilla with GMS.
So I looked at your guide and decided to give it a shot. With Multidisabler, when I tried pushing that to the tablet with sideload, it failed. I have also been unable to move system.img to the tablet. I'm at a loss. I know I am missing something here but just can't figure out what I am doing wrong. I just want to get this tablet up and running with Android and being able to use the 400GB SD card.
Thanks.
JR1979 said:
So I looked at your guide and decided to give it a shot. With Multidisabler, when I tried pushing that to the tablet with sideload, it failed. I have also been unable to move system.img to the tablet. I'm at a loss. I know I am missing something here but just can't figure out what I am doing wrong. I just want to get this tablet up and running with Android and being able to use the 400GB SD card.
Thanks.
Click to expand...
Click to collapse
Does MTP work for you in TWRP? ADB sideload is only for installing zips from your computer; the correct command to send files to device storage is adb push. Still, if you're able to get storage access over USB in TWRP just move the files that way because it's simpler.
I'm honestly not sure if the multidisabler is necessary when using custom firmware or GSIs. I think most likely not.
V0latyle said:
Does MTP work for you in TWRP? ADB sideload is only for installing zips from your computer; the correct command to send files to device storage is adb push. Still, if you're able to get storage access over USB in TWRP just move the files that way because it's simpler.
I'm honestly not sure if the multidisabler is necessary when using custom firmware or GSIs. I think most likely not.
Click to expand...
Click to collapse
Sorry - I just saw this response from you. So MTP is enabled but my laptop was unable to see the tablet. I connected the SD card to my laptop and placed the system.img file on it and then dropped the SD card back into the tablet. I was able to see it in the File Manager. As you said to, I wiped /system and flashed the system.img file. It showed "[IMAGE FLASH COMPLETED]". But when I went to reboot from the main TWRP menu, it said there was no OS installed and asked if I was sure if I wanted to reboot. So I took a gamble and selected Reboot and System again. And I guess I lost on the gamble. It now just loops on the "Samsung Galaxy Tab A with S Pen" splash screen. Well, game over... for tonight.
JR1979 said:
Sorry - I just saw this response from you. So MTP is enabled but my laptop was unable to see the tablet. I connected the SD card to my laptop and placed the system.img file on it and then dropped the SD card back into the tablet. I was able to see it in the File Manager. As you said to, I wiped /system and flashed the system.img file. It showed "[IMAGE FLASH COMPLETED]". But when I went to reboot from the main TWRP menu, it said there was no OS installed and asked if I was sure if I wanted to reboot. So I took a gamble and selected Reboot and System again. And I guess I lost on the gamble. It now just loops on the "Samsung Galaxy Tab A with S Pen" splash screen. Well, game over... for tonight.
Click to expand...
Click to collapse
Don't worry about the No OS warning, I get the same thing on my Tab A after installing a GSI.
You formatted data, yes?
You did NOT wipe /boot or /product I hope?
Something I noticed with the LineageOS GSIs is that the securized ones bootlooped, and I had to flash one of the pre-rooted builds. Can you link the image you tried to flash?
As a test to ensure a GSI runs properly, download one of the Android Developer Preview GSIs and try installing that. Let me know how it goes.
I didn't wipe /boot or /product.
I did format data.
I used the system.img from the aosp_arm64-exp-T2B2.221216.006-9443277-e508d63f.zip file on this page, from the Android Developer Preview GSIs: https://developer.android.com/topic/generic-system-image/releases
I'm guessing I didn't select the right build ?
Thanks again!
JR1979 said:
I didn't wipe /boot or /product.
I did format data.
I used the system.img from the aosp_arm64-exp-T2B2.221216.006-9443277-e508d63f.zip file on this page, from the Android Developer Preview GSIs: https://developer.android.com/topic/generic-system-image/releases
I'm guessing I didn't select the right build ?
Thanks again!
Click to expand...
Click to collapse
I also just tried the system.img from gsi_gms_arm64-exp-T2B2.221216.006-9443277-12a8e193.zip file. I get the same results - the splash screen loop.
JR1979 said:
I also just tried the system.img from gsi_gms_arm64-exp-T2B2.221216.006-9443277-12a8e193.zip file. I get the same results - the splash screen loop.
Click to expand...
Click to collapse
And so I tried the system.img files from the 2 zip files that are in the Android 13 (stable) folder:
aosp_arm64-exp-TP1A.220624.014-8819323-996da050.zip
gsi_gms_arm64-exp-TP1A.220624.014-8819323-8a77fef1.zip
Neither of these work. I still get the splash screen boot loop.
One thing I noticed is when I wipe system, it shows:
========================================
Updating partition details...
...done
Full SELinux support is present.
MTP Enabled
Failed to mount '/system_root' (Invalid argument)
Formatting system using mke2fs...
Done.
Updating partition details...
...done
=========================================
It's almost tablet frisbee time.

Categories

Resources