[GUIDE] Easy decryption guide for GSI users - Huawei P9 Guides, News, & Discussion

Step 0: introduction
Hello everyone. As you may or may not know, after unlocking, rebranding, updating and patching our P9's, we can now install a part of a big universe of brand new Treble ROMs into our devices. An example of that kind of ROMs is the OpenKirin team's AOSP-based ROMs, AndyYan's LineageOS or phhusson's Phh-Treble for a barebones pure Android experience.
But that experience so far is far from perfect. Aside from Q ROMs not booting yet on hi3650 devices like ours, some features may be missing such as camera support, GApps or [insert favorite mod here] which come in the form of flashable zips. A major problem now is that our phone's internal storage must always be encrypted at every ROM install. This poses some problems such as:
* Having to install Huawei's stock recovery every time you need to do a factory reset otherwise your brand new ROM is not booting when you wipe with TWRP.
* Not being able to flash ZIPs in TWRP from the internal storage.
* Having to install custom ROMs by flashing to /system through fastboot which is slow and can be interrupted
* On a fresh ROM boot, the phone takes extra time to encrypt and then on every subsequent boot it will take longer to boot.
Encryption brings extra security, but at the cost of usability and speed. Luckily for us, it can be disabled in favor of having a more traditional custom ROM + TWRP flashing workflow. This can be done by editing a fstab file in our device's vendor partition. Once the procedure is done you will be able to:
* do factory resets from TWRP without problems
* mount internal storage in TWRP and flash ZIPs without problems
* not need to juggle .img files to switch recoveries because everything will be possible from TWRP
Note: This effect is permanent. No need to do it again. You can also easily reverse it manually.
WARNING: YOUR INTERNAL STORAGE MUST BE WIPED CLEAN. BACKUP ANY IMPORTANT DATA TO AN EXTERNAL STORAGE BEFOREHAND. YOU WILL LOSE ALL YOUR FILES AND APPS.
Note: If you ever decide to reflash your stock EMUI firmware, remember that your device will be re-encrypted. If you get stuck at the boot logo after going back to EMUI from a decrypted device, reboot manually to recovery, do a factory reset in the stock recovery and try again.
Required:
* A backup of your important data
* A computer
* working Android install with root
* A working ADB/fastboot environment
* A USB-C cable with data connections
* Pretoriano80's TWRP for Treble-enabled Huawei P9
Your ROM, custom kernels and Magisk will survive the procedure. Don't worry about them.
Step 1: Modify the vendor fstab
Using MiXplorer, navigate to /vendor/etc. We're going to modify the fstab.f2fs.hi3650 file. Back it up in your SD card, because the internal storage will be wiped clean so if you mess the process up you don't want to lose it. Now open the original file with a text editor and edit it, go to the line that contains /data and change the forceencrypt word to encryptable.
Step 2: Flash TWRP
Through Fastboot, install Pretoriano80's TWRP. This is the best TWRP available for our device.
Code:
# fastboot flash recovery_ramdisk twrp.img
For the next step, we need to reboot to the recovery.
Code:
# fastboot reboot recovery
Step 3: Format internal storage
On TWRP, back your internal storage up if you haven't already. This is your last chance to do a backup.
After that, wipe your internal storage. Go to Wipe -> Format Data and confirm. The deed is done.
Now boot your system. ROMs should no longer push their encryption on you, and you can now mount the internal storage in TWRP.

Wattsensi said:
Step 2: Modify fstab and format /data
Click to expand...
Click to collapse
This part is confusing, how to modify fstab?

copy pasted a guide from other users. You shouldnt modify anything and the decryption is a one time story, it breaks after first use.

I tested it on my P9 Plus & it worked man, thank you so much <3

dkionline said:
copy pasted a guide from other users. You shouldnt modify anything and the decryption is a one time story, it breaks after first use.
Click to expand...
Click to collapse
1. No, it doesn't. I tried switching between several "Open"Kirin ROMs and GSIs using a TWRP flash+factory reset workflow, it works well.
2. This entire forum is either sparse solutions spread in deep crevices or hacks from juggling files and editing words in text...surely the guides are so unique, reformatting /data after removing its forceencrypt attribute in /etc/fstab is so unique and special! I'm not trying to throw down zgfg's effort but again, that guide was confusing and required juggling three TWRP copies. I'm just trying to make anyone unfortunate enough to still need to have one of these devices to be able to lessen the pain in the behind that is working with ancient unmaintained Treble implementations, buggy sdcardfs drivers, obscure camera interfaces, broken audio routing and drivers, and secretive ROM cooks who won't share their secret fixes restricting the universe of good ROMs to their own proprietary ROMs that don't get updated, or get updated once every 6 months. Sadly I don't have the time or resources to set a build farm or cook my own ROMs (you probably already know, hundreds of GBs downloaded and 6GB+ of RAM used) Please don't be like this, I like your work.
md sabuj said:
This part is confusing, how to modify fstab?
Click to expand...
Click to collapse
With TWRP, mount /vendor. Then, use TWRP's ADB shell capabilities. Open a command prompt in your computer, and type 'adb shell' and enter. Then, navigate to /vendor/etc/, with the command 'cd /vendor/etc'. Then using vi or nano, edit the fstab.hi3650 file.
Look for the entry that starts with /data. Replace in the same line, 'forceencrypt' with 'encryptable'. Then save, wipe /data and reboot. Remember to investigate thoroughly for consequences and side effects on everything you do.

Btw, developing discussion and instructions from early 2019 about decrypting Data and Internal memory on P9 Oreo - decryption can be done also by use of TWRP instead of manually editing fstab:
https://forum.xda-developers.com/p9/how-to/emui-8-decryption-guide-wipe-t3906245
And a revised summary:
https://forum.xda-developers.com/showpost.php?p=80029346&postcount=1843
They were not necessarily targeting GSI but (at that time) OpenKirin ROMs.
Also, doesn't matter if for EVA AL10, DL00, etc.
Also for stock EMUI 8, but to be able to fully use TWRP (nandroid backup, wiping Dalwik - it's on Data partition, installing zip or img files from Internal memory instead from SD card)
Btw, instead of Terminal and Vi editor (for most of nowadays users their parents were not born yet in the era of pre-WYSIWYG editors, and I doubt if 0.1% would be familiar to navigate with Vi to a particular line and to delete/replace or insert something), one can simply use standard tools like MiXPlorer (root explorer) with its integrated text editor.
In MiXPlorer choose Root, grant the root access, visually navigate to /vendor/etc, click on fstab.hi3650 file, open as Text and edit without frustrations like with Vi editor ?

zgfg said:
Btw, instead of Terminal and Vi editor (for most of nowadays users their parents were not born yet in the era of pre-WYSIWYG editors, and I doubt if 0.1% would be familiar to navigate with Vi to a particular line and to delete/replace or insert something), one can simply use standard tools like MiXPlorer (root explorer) with its integrated text editor.
In MiXPlorer choose Root, grant the root access, visually navigate to /vendor/etc, click on fstab.hi3650 file, open as Text and edit without frustrations like with Vi editor ?
Click to expand...
Click to collapse
Thanks for that, I revised and simplified the guide as much as possible.
btw, my P9 is now a secondary device meaning that I can experiment a little more on it. I can't build ROMs for now but will try to create a barebones kernel with useful features.

Wattsensi said:
Thanks for that, I revised and simplified the guide as much as possible.
btw, my P9 is now a secondary device meaning that I can experiment a little more on it. I can't build ROMs for now but will try to create a barebones kernel with useful features.
Click to expand...
Click to collapse
You have ECOKernel by @dkionline for Oreo

zgfg said:
You have ECOKernel by @dkionline for Oreo
Click to expand...
Click to collapse
I know, I am using it right now and it's a good kernel but I'd like to add some more things like lower minimum brightness, voltage control for undervolting and AutoSMP hotplugging. It runs pretty hot and the IPS display backlight burns my eyes even on the lowest setting

Can I use this method to decrypt P9 installed EMUI8?

md sabuj said:
Can I use this method to decrypt P9 installed EMUI8?
Click to expand...
Click to collapse
@ant0nwax and me did use decrypted storage with b540, see the post #6 above:
https://forum.xda-developers.com/showpost.php?p=83386207&postcount=6
Specially, look at the second post linked there (post was in HWOTA7 thread):
https://forum.xda-developers.com/showpost.php?p=80029346&postcount=1843
There was one catch there (was written for b540):
zgfg said:
Reboot to TWRP and perform the following, in this order:
- Wipe, Swipe to factory reset (not Advanced Wipe, neither Format Data)
- Install three ZIPs (all ogether, in queue): update_data_full_public.zip (from b540 download), b540-update_full_EVA-AL10_all_cn.zip (from b540 download, but fixed by Tecalote to be flashable by TWRP) and Enable-Huawei-OTA.zip (from Tecalote's OP instructions)
Click to expand...
Click to collapse
If I recall correctly after the long time ,(year and a half) - when you format Data you have to restore your b550 part that was installed to Data.
You must not use eRecovery bcs it would encrypt Data again.
Hence you must flash b550 by TWRP and there was a problem with that all_cn zip at that time, reporting me an error (cannot find now TWRP logs from that time to see what was the problem)
I discussed then with @Tecalote and he corrected me the script from the original update all_cn zip for b540 that TWRP was able to flash
As a result, we had EMUI 8, b540 with decrypted storage, giving to TWRP the full access to Data and Internal memory
It was also possible to go back to EMUI 8 with encrypted storage, basically by putting back stock Recovery, by installing latest firmware from eRecovery and by performing Factory reset with Wiping the cache

@Wattsensi: unfortunately, It doesn't work like this in my case. After switching to Chinese EMUI 8, I install Play Store, login to my Google Account and do Play Store things.
After modifying that file in Vendor, I go to recovery, wipe internal storage, wipe Data and restart.
At this moment, it's like after a factory reset, I have to start all over again, but I'm not encrypted.
Well, no matter what I do, I can't login to Google. I open Play Store, it tries to log me in ( the big circles started to spin), at that moment Play Store closes. I go to Accounts and try to login to my Google account from there, same thing. So, for me, Emui 8 is usable only before decryption.
I'm wondering if I'm doing something wrong.

Nightwish1976 said:
@Wattsensi: unfortunately, It doesn't work like this in my case. After switching to Chinese EMUI 8, I install Play Store, login to my Google Account and do Play Store things.
After modifying that file in Vendor, I go to recovery, wipe internal storage, wipe Data and restart.
At this moment, it's like after a factory reset, I have to start all over again, but I'm not encrypted.
Well, no matter what I do, I can't login to Google. I open Play Store, it tries to log me in ( the big circles started to spin), at that moment Play Store closes. I go to Accounts and try to login to my Google account from there, same thing. So, for me, Emui 8 is usable only before decryption.
I'm wondering if I'm doing something wrong.
Click to expand...
Click to collapse
This is indeed strange, and I do not recall the Chinese ROMs having Google services by default, you had to install GApps if I'm not wrong. Try flashing pico OpenGapps for 8.0 ARM64, wiping cache and doing a factory reset again. Sometimes GApps have issues when you don't flush the cache between fresh installs.
https://opengapps.org/

Nightwish1976 said:
Unfortunately, It doesn't work like this in my case. After switching to Chinese EMUI 8, I install Play Store, login to my Google Account and do Play Store things.
After modifying that file in Vendor, I go to recovery, wipe internal storage, wipe Data and restart.
At this moment, it's like after a factory reset, I have to start all over again, but I'm not encrypted.
Well, no matter what I do, I can't login to Google. I open Play Store, it tries to log me in ( the big circles started to spin), at that moment Play Store closes. I go to Accounts and try to login to my Google account from there, same thing. So, for me, Emui 8 is usable only before decryption.
I'm wondering if I'm doing something wrong.
Click to expand...
Click to collapse
Wattsensi said:
This is indeed strange, and I do not recall the Chinese ROMs having Google services by default, you had to install GApps if I'm not wrong. Try flashing pico OpenGapps for 8.0 ARM64, wiping cache and doing a factory reset again. Sometimes GApps have issues when you don't flush the cache between fresh installs.
https://opengapps.org/
Click to expand...
Click to collapse
Be careful. Chinese EMUI 8 does come with Google Play Services (OP posts in HWOTA7 thread) and one only needs to install Google Play app.
Google Play Services were also preinstalled for users who recently updated to b550.
Btw, you didn't write are you on Al10c00b550 or what, but you also wrote that you had Playstore working on EMUI 8 before decrypting and formatting Data
Anyway, before installing MicroG, Open GApps or something, inspect do you still have or not Google Play Services installed.
There are apps like Play Services Info to inspect if Google Play Services, Google Services Framework and Google Play Store are installed (and what are their versions).
E.g, use this app from ApkMirror (since you cannot look for them and install from Playstore):
https://www.apkmirror.com/apk/weberdo/play-services-info/
(Not sure would it work installing Open GApps if stock Google Play Services are still beneath)

Thank you, guys gor your help. Yes, Ch EMUI comes with Google Play Services, one normally has to install only Google Play.
At the moment I'm just setting up my phone with the Lineage OS MicroG Pie ROM and I'm really enjoining it, but as soon as I decide to try something else, I'll put your suggestions to use.

Related

Sharp SH7218u

This thread is dedicated to hacking and development of the Sharp SH7218u. This is an Android phone with a somewhat unique clamshell form-factor.
Before proceeding, please note that all of the usual warnings apply. The software and techniques described here have the potential to break your device and make it unusable. By using the software and following these techniques you run the risk of bricking your phone. I take no responsibility if this happens - proceed at your own risk.
First, some credits for the work of others:
Z4root:
Developed by xda member RyanZA.
http://forum.xda-developers.com/showthread.php?t=833953
SH7218u Clockworkmod Recovery:
Clockworkmod original developer is Koushik Dutta:
www.clockworkmod.com
Dialer2:
Original developer of now open source dialer is dnaq Productions:
http://dnaq.tumblr.com/
Initial hacking and development work:
Gigi Tse is credited for early and ongoing work for the SH7218u:
http://gigitse.com/
http://www.msharp.cn/forum/t390991/page1/
Now on the instructions....
-------------------
Rooting Your Phone, Installing Clockworkmod Recovery, and Installing Google Apps
Gather the Required Files:
1. Go to the z4root xda thread, login in and download z4root.1.3.0.apk:
http://forum.xda-developers.com/showthread.php?t=833953
2. Download SH7218u_recovery.apk:
(attached below)
3. Download the Clockworkmod recovery flashable Google Apps file from the following site:
http://goo-inside.me/gapps
In the table, you want to select the HDPI, CyanogenMod 6 version. The file that you download should be
called 'gapps-hdpi-20101114-signed.zip'
4. Place these three files on your micro-SD card and insert the card into your phone.
Root Your Phone
1. Boot up your phone and skip the system setup wizard. Go to the app drawer and run 'Settings'.
2. Select 'Applications', and enable 'Unknown sources'.
3. Select 'Development', and enable 'USB debugging'.
4. Exit back out to your home screen launcher, then go to the app drawer and run 'ES File Explorer'.
5. The file explorer should show you the contents of your sd card. Tap on the file 'z4root.1.3.0.apk'.
6. Confirm installation of z4root, and when this is complete select 'Open' to run the app.
7. From within z4root, press the 'Permanent Root' button.
8. Wait until this process is complete, and the phone will reboot by itself. It can take 30 seconds or so for this to happen, so be patient. You are now rooted.
Flash Clockworkmod Recovery Image
You must be rooted for this to work. Do this after you have successfully completed the rooting process above. Also please note that this is not the CWM recovery image developed by Gigi Tse. Her image contains CWM version 3.0.2.4. This is my recovery image and contains CWM version 5.0.2.8.
1. Open the app drawer and run 'ES File Explorer'.
2. Tap on the file 'SH7218u_recovery.apk'.
3. Confirm installation and run the application by selecting 'Open' once installation is complete.
4. On startup, the application will request Superuser privleges - press 'Accept' to allow this.
5. Press the 'Flash Clockworkmod Recovery' button.
6. Wait a few seconds until you see the confirmation message 'Recovery Flash Complete'.
7. Exit out of the application. You now have Clockworkmod as your recovery. You can uninstall the SH7218u_recovery app if you wish as you have no further use of it.
Note for users of Link2SD: This version of Clockworkmod recovery will perform backup and restore operations on the secondary SD card partition used by Link2SD. However, that partition must be formatted in the ext3 filesystem for this to work. Formatting the partition in any other filesystem (e.g. ext2, fat32, ext4, etc.), will result in failure to mount and backup the partition. An SD card can be prepared for use with Link2SD from within this version of Clockworkmod recovery by using the 'Partition SD Card' feature within the 'Advanced' menu.
Install Google Apps
1. Boot into Clockworkmod Recovery. This is done by powering down your phone, then turning it back on by pressing and holding down the number 3 and 6 buttons together, then pressing and releasing the power button. Continue to hold the number 3 and 6 buttons until you see the Clockworkmod screen.
2. Select 'install zip from sdcard' from the menu.
3. Select 'choose zip from sdcard' from the next menu.
4. The next menu will be the contents of your sdcard. Select the Google Apps file - 'gapps-hdpi-20101114-signed.zip'.
5. Confirm the installation and wait until it is complete.
6. Press the back button once to get back to the main screen and select 'reboot system now'. You now have Google Apps installed.
When you reboot the device, you will be taken through the Google account setup. Please note that in order for contacts applications to work with Google synchronization, you will need to install a modified contact editor. The stock firmware on this phone is not intended to sync with the Google servers as it was intended for Chinese users. The modified contact editor fixes this issue. It is free and available from the Market. Look for 'Contact Editor Free' by a developer named 'dmfs'.
Deleted
Deleted
Thank you! Very good job!
No ideas how to get the phone to answer a call when you open?
TabletGuru said:
Thank you! Very good job!
No ideas how to get the phone to answer a call when you open?
Click to expand...
Click to collapse
Hey someone read my thread!!
Sorry, no posts on this thread yet and it has been up for a while. I think most people who have this phone stick to Howard forums or other such sites that cater to the phone type and its region of origin.
As for your question, no...but I have tried. That would require a modification of the phone app or a change to the OS itself as the phone app is the active app when the phone is ringing and the device is opened. If I had the source code for the stock phone app, this would be a fairly easy thing to do. Unfortunately, I have been unable to find the source for the stock device firmware anywhere. I tried compiling a generic Froyo phone app from the Google source, but of course this did not work. This is a somewhat special app that needs to interface with several parts of the device's hardware, so a generic version just doesn't work. Unless Sharp releases the full source code for the stock firmware, I don't think this is going to be possible....at least not from someone with my somewhat limited development abilities.
Sent from my MB855 using xda premium
Google Play
Hey xdajunkman, amazing work you are doing here.
Have you considered adding Google Play to the mix? I was able to get the latest version working just fine on my SH7218u.
How hard would it be to hack the light notifications area of the phone, to make some of the notifications last for 1-2 seconds longer?
I should also add that my phone is giving some really flaky GPS information. It is putting me somewhere in the ocean near China unless I use wifi only. Do you have any experience with this?
EDIT: I don't know why, but the dialer is not working for me with regard to the long-press of the delete key and silent (#) key. No idea why...
EDIT2: It is because I had another keyboard installed; which must do something funky... switching back to a default keyboard and then trying seemed to work!
Thanks for your guide! Do you have got new version Rom? 2.3 or 2.3.5?
johnny8384 said:
Thanks for your guide! Do you have got new version Rom? 2.3 or 2.3.5?
Click to expand...
Click to collapse
Not likely to come. This would mean building something like CM7 for a new device from scratch. This kind of task takes dozens of man-hours for an expert developer, and that assumes that they have access to the original source for the release build. We do not have the original source, and there is no such developer working on this device. We will be stuck with Froyo.
Thank you so much for taking the time to write a guide xdajunkman!
I received my SH7218u today and did everything. The instructions were clear and the whole process took no more than 30 minutes.
Surprisingly, my SH7218u accepts 64 microsd card (after you format it).
Is it ok to have 2 partitions?
One is a ext2, and the other I just created using clockwork mod ext3...
I'm wanting to use that custom rom..
EDIT: clockwork mod Repartitioned my ext2 to ext3 now ಠ_ಠ
and all my apps are "installed"
Going to make a backup rom now.. and then Install xdajunkman's custom rom >__<
EDIT: Ok succesfully installed the Custom rom It looks great I might say awesome work xdajunkman
Ok the question is now.. how to I get back all my previous apps and stuff?
I followed the guide and made a backup already
My 7218u stuck at Sharp logo when boot because i've uninstalled a system apps ( don't remember exactly) what i've to do now? plz help me
P/S: My english sucks, sorry for that
delpan said:
My 7218u stuck at Sharp logo when boot because i've uninstalled a system apps ( don't remember exactly) what i've to do now? plz help me
P/S: My english sucks, sorry for that
Click to expand...
Click to collapse
Boot into clockwork mod by pressing 3and 6 and the power on button, (assuming you have that installed)
Reinstall the rom.. http://forum.xda-developers.com/showthread.php?p=22106340#post22106340
sirjoe1 said:
EDIT: Ok succesfully installed the Custom rom It looks great I might say awesome work xdajunkman
Ok the question is now.. how to I get back all my previous apps and stuff?
I followed the guide and made a backup already
Click to expand...
Click to collapse
It is usually just easier if you wait until you have the new ROM installed before you try and install your apps. There is no reliable way from within CWM to restore your installed apps.
However, because the new ROM is just a modified version of the stock ROM, it should be possible to flash the new ROM without wiping the existing user data and keeping your installed apps. Restore your backup that has all of your apps installed. Then, flash the modified ROM but skip the step in the instructions that tells you to wipe existing user data. Instead of wiping the user data, do the following:
1. In the 'mounts and storage' menu of CWM recovery, select to format both '/system' and '/cache'
2. In the 'advanced' menu of CWM, select 'Wipe Dalvik cache'
Now proceed with installing the ROM as per the instructions. This should result in the modified ROM being installed, but all of your installed apps should be protected.
If this does not work, then you will just have to re-installed the modified ROM according to the instructions (including wiping the existing user data), then re-install all of your apps. For future reference, a great app called Titanium Backup will allow you to backup your apps and restore them after changing the ROM.
sirjoe1 said:
-->My 7218u stuck at Sharp logo when boot because i've uninstalled a system apps
-->( don't remember exactly) what i've to do now? plz help me
Boot into clockwork mod by pressing 3and 6 and the power on button, (assuming you have that installed)
Reinstall the rom.. http://forum.xda-developers.com/showthread.php?p=22106340#post22106340
Click to expand...
Click to collapse
Agree with sirjoe1. Hopefully you flashed CWM as your recovery before you did this. However, if not then booting into recovery mode as described above should trigger a factory reset from the stock recovery partition. I have not attempted this myself with the stock recovery, but usually what this will do is simply return your device to it's stock state. You can then start over using the instructions in the OP....but without deleting critical system apps this time.
Hello again, I've a question, has anyone successfully Overclocked the cpu frequency on this phone using setcpu or similar apps?
Overclocking not possible without either a custom kernel or a kernel module of some sort. As the source for the stock kernel was never released, such a thing would be a HUGE undertaking. Very unlikely to ever happen.
xdajunkman said:
Overclocking not possible without either a custom kernel or a kernel module of some sort. As the source for the stock kernel was never released, such a thing would be a HUGE undertaking. Very unlikely to ever happen.
Click to expand...
Click to collapse
Oh darn, that's such a downer..
These sh7218u threads are so dead nowadays :/
I might have messed up my phone -_- (again)
I went into the /data/sdext2/dalvik-cache and deleted everything and now a few apps have gone missing, and some won't work, they just give me a force close error >___<
I also lost my go launcher ex settings..
and to make things worse.... my internal memory went to 0% free... deleted a few things to clear up 8mb..
Any Ideas how to fix this ? @[email protected]
[Can you guys play 480p videos?
I can't.. 360p runs fine though..]
I am hoping to get this device this week.
Thanks for your tutorial, and I will let you know if it runs out just fine

[TWRP backup/restore] Temporary solution for Pokemon Go / SafetyNet

here's a dirty method for Pokemon DesperaGos. it can also help to fool Niantic's account monitoring algorithms if they recognize and distinguish accounts from others that only log in while there's known-working root hiding methods.
make a full backup of your daily rom. odds are we all have one anyways, so that's probably covered but I'll have to point out that if you play a lot of games that do NOT save progress online or to internal/external sd, then this "solution" is not for you!! why? because upon restoring, your progress will be a few hours to a few weeks behind depending when the backup was made.
this is also not for owners of devices with a locked bootloader.
A LOT OF WHAT I'LL HAVE YOU DOING STRONGLY DISCOURAGED UNDER NORMAL CIRCUMSTANCES
HIGH PROBABILITY OF LEAVING YOU WITH A SOFT BRICK IF YOU DO NOT MAINTAIN A SEPARATE BACKUP!
MUST HAVE TWRP OR A RECOVERY WITH FILE MANAGER
onto the fun part. pick any rom, preferably a very small one, that comes with SELINUX ENFORCING by default, else pair it with a kernel that can be switched to enforcing and remain that way indefinitely, across reboots, after UNROOTING.
install your victim of a rom, (if needed) kernel meeting the above standard, and if CM based, nano gapps. **if you do NOT use supersu** have a copy of a recovery-flashable supersu zip on your device for use later or if your choice rom comes without root, flash it right away.
do your initial boot, set up the bare essential settings (network, display, google account), and install Google Play Games from Google Play.
reboot to recovery, make a backup of this rom and give it a name along the lines of unrooted or Pokemon Go or both. for the sake of time, you can disable md5 generation.
boot back to system, and start debloating the living hell out of it. Browser? YouTube? gmail? widgets? it's a blow-out. everything that won't prevent the rom from functioning gets uninstalled. the more you uninstall, the less time it'll take to get your Pokemon Go shoes on.
do not uninstall anything needed for Google Play to function either!
this rom will serve no purpose but to play Pokemon Go. you can even scrap some language files (~100-250mb) for nations on other continents. you'll find them in various folders in the System folder but don't touch Chinese (zh / chn) had bad experiences. if your rom of choice was made available in the forums from a dev in a different nation that speaks your same language i.e. GB / EN or SPAIN / MEX, don't delete either.
during this very very thorough debloating process, feel free to renew the backup as you go, so if you do something that breaks the rom, you won't have to start over.
all done? uninstall any and all root tools related and unrelated to the debloating process.
supersu users, open supersu. go to Settings, scroll down to Full permanent unroot and hit it.
non supersu users, including CM, install supersu from Google Play and launch it. tap Expert. CANCEL THE PROMPT TO UPDATE BINARY. then do the same -- settings, and permanent unroot.
your device is NOT READY FOR POKEMON GO YET!
reboot to recovery, and verify that System is mounted. navigate to your recovery's built in file manager -- for TWRP it's in Advanced. in the root of the device you should see a folder called supersu. delete it. if it's not there, proceed.
go in the System folder and look inside bin and xbin for a file simply named "su" and if there, delete it as well.
now, one last time, re-make your backup of this rom.
congrats! you now have a rom that should be slim enough to quickly switch to, 4-8 minutes, when you're hitting the road or curb for some pokismans.
when switching to/from your main rom and Pokemon Go rom, you should always wipe cache and dalvik
Edit: you won't need to do this if you include Cache in your TWRP backups
use your recovery's Restore function as a make-shift multi-rom.
Sterist said:
here's a dirty method for Pokemon DesperaGos. it can also help to fool Niantic's account monitoring algorithms if they recognize and distinguish accounts from others that only log in while there's known-working root hiding methods.
make a full backup of your daily rom. odds are we all have one anyways, so that's probably covered but I'll have to point out that if you play a lot of games that do NOT save progress online or to internal/external sd, then this "solution" is not for you!! why? because upon restoring, your progress will be a few hours to a few weeks behind depending when the backup was made.
this is also not for owners of devices with a locked bootloader.
A LOT OF WHAT I'LL HAVE YOU DOING STRONGLYDISCOURAGED UNDER NORMALCIRCUMSTANCES
HIGH PROBABILITY OF LEAVING YOU WITH A SOFT BRICK IF YOU DO NOT MAINTAIN A SEPARATE BACKUP!
MUST HAVE TWRP OR A RECOVERY WITH FILE MANAGER
onto the fun part. pick any rom, preferably a very small one, that comes with SELINUX ENFORCING by default, else pair it with a kernel that can be switched to enforcing and remain that way indefinitely, across reboots, after UNROOTING.
install your victim of a rom, (if needed) kernel meeting the above standard, and if CM based, nano gapps. **if you do NOT use supersu** have a copy of a recovery-flashable supersu zip on your device for use later or if your choice rom comes without root, flash it right away.
do your initial boot, set up the bare essential settings (network, display, google account), and install Google Play Games from Google Play.
reboot to recovery, make a backup of this rom and give it a name along the lines of unrooted or Pokemon Go or both. for the sake of time, you can disable md5 generation.
boot back to system, and start debloating the living hell out of it. Browser? YouTube? gmail? widgets? it's a blow-out. everything that won't prevent the rom from functioning gets uninstalled. the more you uninstall, the less time it'll take to get your Pokemon Go shoes on.
do not uninstall anything needed for Google Play to function either!
this rom will serve no purpose but to play Pokemon Go. you can even scrap some language files (~100-250mb) for nations on other continents. you'll find them in various folders in the System folder but don't touch Chinese (zh / chn) had bad experiences. if your rom of choice was made available in the forums from a dev in a different nation that speaks your same language i.e. GB / EN or SPAIN / MEX, don't delete either.
during this very very thorough debloating process, feel free to renew the backup as you go, so if you do something that breaks the rom, you won't have to start over.
all done? uninstall any and all root tools related and unrelated to the debloating process.
supersu users, open supersu. go to Settings, scroll down to Full permanent unroot and hit it.
non supersu users, including CM, install supersu from Google Play and launch it. tap Expert. CANCEL THE PROMPT TO UPDATE BINARY. then do the same -- settings, and permanent unroot.
your device is NOT READY FOR POKEMON GO YET!
reboot to recovery, and verify that System is mounted. navigate to your recovery's built in file manager -- for TWRP it's in Advanced. in the root of the device you should see a folder called supersu. delete it. if it's not there, proceed.
go in the System folder and look inside bin and xbin for a file simply named "su" and if there, delete it as well.
now, one last time, re-make your backup of this rom.
congrats! you now have a rom that should be slim enough to quickly switch to, 4-8 minutes, when you're hitting the road or curb for some pokismans.
when switching to/from your main rom and Pokemon Go rom, you should always wipe cache and dalvik
use your recovery's Restore function as a make-shift multi-rom.
Click to expand...
Click to collapse
That's impressive! Im a newb, but I think I understand most of the concept. I wanted to ask- instead of having to try to successfully do all that, creating dual ROMS, do you know any other way for an unrooted phone with a custom ROM to acquire and use the google libraries necessary to trick SafetyNet and pass the CTS profile match?
davizzyus said:
That's impressive! Im a newb, but I think I understand most of the concept. I wanted to ask- instead of having to try to successfully do all that, creating dual ROMS, do you know any other way for an unrooted phone with a custom ROM to acquire and use the google libraries necessary to trick SafetyNet and pass the CTS profile match?
Click to expand...
Click to collapse
if an unrooted custom rom is not passing safetynet, then, to the extent of my knowledge, there are still remnant superuser (no specific kind, just in general) files. this also includes xposed framework, not sure if it's app (aka installer) will cause a fail

Oneplus 6 bootloop after upgrade to 9.0.4 (+failed to restore the nandroid backup!)

So I have the OP6 for a while now. Everytime a new version released I download the new official zip file and then flash it with twrp. (follow this post - https://forum.xda-developers.com/showpost.php?p=76596833&postcount=3)
So I did it for 9.0.4, I first took nandroid backup, flash the new firmware, flash twrp, reboot to recovery, flash magisk. And then when I tried to reboot the system I got a message "Shutting down..." when the android system tried to load so I was stuck at bootlooping.
I thought that maybe something in the installation went wrong, so I might just get it restored. I did the restore using the latest twrp (v9.91) and now the system is completly corrupt, the phone no longer able to load anyhing (no oneplus loading screen with the rolling dot) and I when it boot to twrp it no longer can decrypt the filesystem (doesn't ask for my password).
I don't know I could I meesed this up, I did the same step every new upgrade. Apperiate any insight to my situasion.
What do you think caused this? Can I decrypt the files on my phone somehow and restore them?
Thank you in advanced.
b217260 said:
So I have the OP6 for a while now. Everytime a new version released I download the new official zip file and then flash it with twrp. (follow this post - https://forum.xda-developers.com/showpost.php?p=76596833&postcount=3)
So I did it for 9.0.4, I first took nandroid backup, flash the new firmware, flash twrp, reboot to recovery, flash magisk. And then when I tried to reboot the system I got a message "Shutting down..." when the android system tried to load so I was stuck at bootlooping.
I thought that maybe something in the installation went wrong, so I might just get it restored. I did the restore using the latest twrp (v9.91) and now the system is completly corrupt, the phone no longer able to load anyhing (no oneplus loading screen with the rolling dot) and I when it boot to twrp it no longer can decrypt the filesystem (doesn't ask for my password).
I don't know I could I meesed this up, I did the same step every new upgrade. Apperiate any insight to my situasion.
What do you think caused this? Can I decrypt the files on my phone somehow and restore them?
Thank you in advanced.
Click to expand...
Click to collapse
Ok this is a giant pain in the backside but I have done this before and I know it works. Here is a step by step guide to restore.
1. https://forum.xda-developers.com/oneplus-6/how-to/rom-stock-fastboot-roms-oneplus-6-t3796665 go here and download the fastboot rom for the rom YOU HAD ON THE PHONE WHEN YOU MADE THE NANDROID BACKUP. Step by step on how to install it is there.
2. Install the rom and boot up the phone. Don't bother signing in to google or downloading apps or any of that. Just get through all the menus.
3. Install TWRP. Bluspark TWRP is recommended.
4. Install Magisk, but make sure IT IS THE SAME VERSION OF MAGISK AS WAS INSTALLED IN THE NANDROID BACKUP
5. Reboot to system and make sure the phone still works, then reboot to TWRP
6. Restore Nandroid backup.
I know this is a giant hassle, but it works every time. I haven't found a better way to restore a backup since this whole A/B partitioning started.
Thank you for making the time writing this, it is relief to hear that you figure this out. Will try this first in the morning.
I did a bad mistake running the flash-all.bat thinking it will only flash the partitions of the system.
Well it is all gone now...Dam if only I wait until the morning I might not made this mistake.
tabletalker7 said:
Ok this is a giant pain in the backside but I have done this before and I know it works. Here is a step by step guide to restore.
1. https://forum.xda-developers.com/oneplus-6/how-to/rom-stock-fastboot-roms-oneplus-6-t3796665 go here and download the fastboot rom for the rom YOU HAD ON THE PHONE WHEN YOU MADE THE NANDROID BACKUP. Step by step on how to install it is there.
2. Install the rom and boot up the phone. Don't bother signing in to google or downloading apps or any of that. Just get through all the menus.
3. Install TWRP. Bluspark TWRP is recommended.
4. Install Magisk, but make sure IT IS THE SAME VERSION OF MAGISK AS WAS INSTALLED IN THE NANDROID BACKUP
5. Reboot to system and make sure the phone still works, then reboot to TWRP
6. Restore Nandroid backup.
I know this is a giant hassle, but it works every time. I haven't found a better way to restore a backup since this whole A/B partitioning started.
Click to expand...
Click to collapse
This guide can also be used to restore from other roms;
b217260 said:
I did a bad mistake running the flash-all.bat thinking it will only flash the partitions of the system.
Well it is all gone now...Dam if only I wait until the morning I might not made this mistake.
Click to expand...
Click to collapse
What did you do?
---------- Post added at 02:14 PM ---------- Previous post was at 02:13 PM ----------
petran07 said:
This guide can also be used to restore from other roms;
Click to expand...
Click to collapse
I guess so. I never had to use a backup to restore on a custom ROM yet.
tabletalker7 said:
What did you do?
Click to expand...
Click to collapse
After extracting the stock zip flasher, there is file "flash-all.bat" on the root of the folder. (Guess I needed to use the "flash-all-partitions-fastboot.bat)
Thinking it will only flash the android system partitions I've run it and realize that my internal stoarge was formatted.
Really stupid mistake from my part, sorry for couldn't verify your guide.
Hoping that someone who read this in the future won't do my mistake.
b217260 said:
After extracting the stock zip flasher, there is file "flash-all.bat" on the root of the folder. (Guess I needed to use the "flash-all-partitions-fastboot.bat)
Thinking it will only flash the android system partitions I've run it and realize that my internal stoarge was formatted.
Really stupid mistake from my part, sorry for couldn't verify your guide.
Hoping that someone who read this in the future won't do my mistake.
Click to expand...
Click to collapse
It's my bad. I always store my backups on an SD card with my OTG card reader. I forget others don't think like I do sometimes
tabletalker7 said:
Ok this is a giant pain in the backside but I have done this before and I know it works. Here is a step by step guide to restore.
1. https://forum.xda-developers.com/oneplus-6/how-to/rom-stock-fastboot-roms-oneplus-6-t3796665 go here and download the fastboot rom for the rom YOU HAD ON THE PHONE WHEN YOU MADE THE NANDROID BACKUP. Step by step on how to install it is there.
2. Install the rom and boot up the phone. Don't bother signing in to google or downloading apps or any of that. Just get through all the menus.
3. Install TWRP. Bluspark TWRP is recommended.
4. Install Magisk, but make sure IT IS THE SAME VERSION OF MAGISK AS WAS INSTALLED IN THE NANDROID BACKUP
5. Reboot to system and make sure the phone still works, then reboot to TWRP
6. Restore Nandroid backup.
I know this is a giant hassle, but it works every time. I haven't found a better way to restore a backup since this whole A/B partitioning started.
Click to expand...
Click to collapse
tabletalker7, can you please explain a little technical detail? If i follow your procedure, what is the difference from me just restoring boot, system and data from a Nandroid backup of a system that used to boot? What causes the restored system to no longer boot?
Because you seem to be suggesting a solution for the the problem I had. I normally do plenty of backups and play around with the system quite a lot, but Op6 burned me: I was unable to restore from a backup like I always did on other phones. I tried suggestions from other posters to no avail. So I set up a clean system from a fastboot rom and reinstalled everything from Titanium. I wonder, after I set pretty much identically, should I just risk and to once more try to restore from that Nandroid that was failing to restore (that only had system and data btw)? I'd greatly appreciate if you can enlighten.
b217260 said:
So I have the OP6 for a while now. Everytime a new version released I download the new official zip file and then flash it with twrp. (follow this post - https://forum.xda-developers.com/showpost.php?p=76596833&postcount=3)
So I did it for 9.0.4, I first took nandroid backup, flash the new firmware, flash twrp, reboot to recovery, flash magisk. And then when I tried to reboot the system I got a message "Shutting down..." when the android system tried to load so I was stuck at bootlooping.
I thought that maybe something in the installation went wrong, so I might just get it restored. I did the restore using the latest twrp (v9.91) and now the system is completly corrupt, the phone no longer able to load anyhing (no oneplus loading screen with the rolling dot) and I when it boot to twrp it no longer can decrypt the filesystem (doesn't ask for my password).
I don't know I could I meesed this up, I did the same step every new upgrade. Apperiate any insight to my situasion.
What do you think caused this? Can I decrypt the files on my phone somehow and restore them?
Thank you in advanced.
Click to expand...
Click to collapse
Had faced this many times. ...after trying diff options and failed Qualcome MSM method works perfectly.
Yep, You cant restore data i think as it being already formated as per knowd based on your steps above on diff posts
ahacker said:
tabletalker7, can you please explain a little technical detail? If i follow your procedure, what is the difference from me just restoring boot, system and data from a Nandroid backup of a system that used to boot? What causes the restored system to no longer boot?
Because you seem to be suggesting a solution for the the problem I had. I normally do plenty of backups and play around with the system quite a lot, but Op6 burned me: I was unable to restore from a backup like I always did on other phones. I tried suggestions from other posters to no avail. So I set up a clean system from a fastboot rom and reinstalled everything from Titanium. I wonder, after I set pretty much identically, should I just risk and to once more try to restore from that Nandroid that was failing to restore (that only had system and data btw)? I'd greatly appreciate if you can enlighten.
Click to expand...
Click to collapse
1. Changing Android security updates makes changes to phone encryption. It will make the data itself on the backup unreadable to the operating system. That is why people playing with many different custom ROMs had problems with data stored on their phones.
2. By using the fastboot rom you ensure that both partitions have the same operating system. A/B partitioning seems like a great idea on paper but it seems to be executed in the most horrible way possible.
tabletalker7 said:
1. Changing Android security updates makes changes to phone encryption. It will make the data itself on the backup unreadable to the operating system. That is why people playing with many different custom ROMs had problems with data stored on their phones.
2. By using the fastboot rom you ensure that both partitions have the same operating system. A/B partitioning seems like a great idea on paper but it seems to be executed in the most horrible way possible.
Click to expand...
Click to collapse
Thanks a lot. It is plausible and I remeber seeing folder names to which random hex strings were appended (I did not see file contents though). But after last restores I verified that the folder names in /data/data folder were looking allright. Twrp apparently could decrypt the data partition, but the system would still not boot. If I were to encypr the data partition I'd use the whole partition as one encrypted block and not bother doing it on file or folder basis, which is more error-prone. Another sourse of doubt is that I never played with OS version upgrades nor with installing other roms.
Can you also please answer the following? Do you think I can try to restore my boot+system to a different slot and then come back to my original slot if my playing there is unsuccesfull? Being scared that restoring a previous state can fail is a major problem.
ahacker said:
Thanks a lot. It is plausible and I remeber seeing folder names to which random hex strings were appended (I did not see file contents though). But after last restores I verified that the folder names in /data/data folder were looking allright. Twrp apparently could decrypt the data partition, but the system would still not boot. If I were to encypr the data partition I'd use the whole partition as one encrypted block and not bother doing it on file or folder basis, which is more error-prone. Another sourse of doubt is that I never played with OS version upgrades nor with installing other roms.
Can you also please answer the following? Do you think I can try to restore my boot+system to a different slot and then come back to my original slot if my playing there is unsuccesfull? Being scared that restoring a previous state can fail is a major problem.
Click to expand...
Click to collapse
I would not recommend doing that. While you may have different roms on different partitions you only have one data partition. That is asking for trouble
tabletalker7 said:
I would not recommend doing that. While you may have different roms on different partitions you only have one data partition. That is asking for trouble
Click to expand...
Click to collapse
I would have data backed up, sure.
What bothers me is that an essential property of a digital automaton is that if you start it from the same state it will continue the same. Nandroid used to capture all that mattered for identical runs. It no longer does, something is missing, such as some encryption keys for data partition, as you seem to suggest. This bothers me.
ahacker said:
I would have data backed up, sure.
What bothers me is that an essential property of a digital automaton is that if you start it from the same state it will continue the same. Nandroid used to capture all that mattered for identical runs. It no longer does, something is missing, such as some encryption keys for data partition, as you seem to suggest. This bothers me.
Click to expand...
Click to collapse
What bothers you here are things I call "security". If the nandroid backup has the encryption keys to decrypt it, then the data is not secure.
tabletalker7 said:
What bothers you here are things I call "security". If the nandroid backup has the encryption keys to decrypt it, then the data is not secure.
Click to expand...
Click to collapse
Nandroid backups should be encrypted when created with a user supplied key. Twrp allowed this since ages ago. Not allowing the user to restore a backup is not a right substitution for this.
ahacker said:
Nandroid backups should be encrypted when created with a user supplied key. Twrp allowed this since ages ago. Not allowing the user to restore a backup is not a right substitution for this.
Click to expand...
Click to collapse
TWRP didn't do this. Android didn't do this. Ya know, if this is anywhere near as horrible for you as you are making it sound, my advise for you would be to buy Apple products. Bottom line is a new feature was added to Android, and your backup does work.
tabletalker7 said:
TWRP didn't do this. Android didn't do this. Ya know, if this is anywhere near as horrible for you as you are making it sound, my advise for you would be to buy Apple products. Bottom line is a new feature was added to Android, and your backup does work.
Click to expand...
Click to collapse
-It is as horrible as not being able to restore a full backup. No more, no less.
-Twrp has an ability to encrypt your backups, with your experience you must know this.
-You are suggesting someone to switch to iphone only because they point out that the things are wrong or dont add up.
-It is quite a common knowlege that you get good security out of encryption if you make things explicit and clear. And not how you may think it is. Cause you don't seem to know where the keys are stored for the data partition. Obviousely, because the phone eventually decrypts your data, the keys must be stored somewhere or derived from you swipe pattern.
tabletalker7 said:
Ok this is a giant pain in the backside but I have done this before and I know it works. Here is a step by step guide to restore.
1. https://forum.xda-developers.com/oneplus-6/how-to/rom-stock-fastboot-roms-oneplus-6-t3796665 go here and download the fastboot rom for the rom YOU HAD ON THE PHONE WHEN YOU MADE THE NANDROID BACKUP. Step by step on how to install it is there.
2. Install the rom and boot up the phone. Don't bother signing in to google or downloading apps or any of that. Just get through all the menus.
3. Install TWRP. Bluspark TWRP is recommended.
4. Install Magisk, but make sure IT IS THE SAME VERSION OF MAGISK AS WAS INSTALLED IN THE NANDROID BACKUP
5. Reboot to system and make sure the phone still works, then reboot to TWRP
6. Restore Nandroid backup.
I know this is a giant hassle, but it works every time. I haven't found a better way to restore a backup since this whole A/B partitioning started.
Click to expand...
Click to collapse
Following these instructions seems to be the only way of restoring a nandroid backup (at least for my Op6 bought on AliExpress from China). Important: step 1 wipes your sdcard, so the backup you want to restore must be on otg usb stick.
After spending many hours I managed to restore a backup at least once. Fortunately for me I have no plans of upgarding Android and will likely forever stick with the following set:
1) 5.1.11-OREO-OnePlus6Oxygen_22_OTA_015_all_1808102118_770880-FASTBOOT.zip (found here)
2) twrp-3.2.3-x_blu_spark_v9.85_op6.img + twrp-3.2.3-x_blu_spark_v9.85_op6.zip (found here)
3) Magisk-v18.1.zip (found here)
My plan is to fully debloat the phone and then I will keep everything unchanged for years, because nowadays updates are more about twisting your arms than giving you usefull features. I almost got to that state, but one little glitch forced me to roll back and the whole hell with the Nandoid backups on Op6 started.
PS: It's very interesting what is really going on with this A/B system. There must be a storage where the encryption keys are stored (if it is the encryption that does prevent the phone from restoring. Which I doubt because Twrp sees the files fine). There also probbaly stored what slot is used. That information does not get captured by the Nandroid backup.
(Btw, It seems that blu_spark Twrp is really NOT encrypting your backups with the passwod you supply. Official Twrp does. I have plenty of old encypted backups, from wich I could not extract any personal data (/data/data folder) but yesterday I could extract my private information from a backup done by blu_spark Twrp. This is serious iussue. I'll double check and will post if confirmed.)
Not confirmed, I was looking at unencrypoted file.

Backup and Restore - a Hybrid Method (Android 9)

I am developing this method because TWRP will not restore correctly ever since I upgraded my bootloader from U2 to U4.
Boot and Data will restore but System will not, so I do the following.
Backup
1. Use TWRP to backup Boot and Data and reboot
2. Use a root explorer to copy /system/app to external sd
3. Copy /system/priv-app to external sd
Debloat by deleting apps from these 2 backup files
Restore
1. Boot into TWRP and install system.img (extract from ap section of downloaded firmware for stock) or install UPie
2. Restore Boot and Data as usual
3. Go to Advanced - File Manager
4. Delete /system/system/app and /system/system/priv-app
5. Copy and paste backup app files to /system/system
6. Reboot
Note: TWRP has its own system which holds the ROM system as a sub directory.
If anyone can think of another system directory which I can backup and restore please let me know.
physwizz said:
I am developing this method because TWRP will not restore correctly ever since I upgraded my bootloader from U2 to U4.
Boot and Data will restore but System will not, so I do the following.
Backup
1. Use TWRP to backup boot and Data and reboot
2. Use a root explorer to copy /system/app to external sd
3. Copy /system/priv-app to external sd
Debloat by deleting apps from these 2 backup files
Restore
1. Boot into TWRP and install system.img
2. Restore boot and Data as usual
3. Go to Advanced - File Manager
4. Delete /system/system/app and /system/system/priv-app
5. Copy and paste backup app files
6. Reboot
Note: TWRP has its own system which holds the ROM system as a sub directory.
Click to expand...
Click to collapse
This is great. I have issues that caused my settings app to show extra and weird options after a restore from TWRP in the past. But since then I've updated to a new TWRP but haven't done any restoring because of what the previous one did. Hope this works when I need it to.
Jeremy_J7 said:
This is great. I have issues that caused my settings app to show extra and weird options after a restore from TWinRP in the past. But since then I've updated to a new TWRP but haven't done any restoring because of what the previous one did. Hope this works when I need it to.
Click to expand...
Click to collapse
I think the system settings are stored in /data
I'll add it to the list.
physwizz said:
I think the system settings are stored in /data
I'll add it to the list.
Click to expand...
Click to collapse
Test it before you add to the list, can't be giving these people false information bro ?
Jeremy_J7 said:
Test it before you add to the list, can't be giving these people false information bro
Click to expand...
Click to collapse
True
I debloated from here
https://forum.xda-developers.com/galaxy-a20/development/debloat-samsung-a20-variants-t4070957
Then I added the updated camera from Ultimate Pie.
My app folders are here
https://mega.nz/file/dtkkES5L#YfHwWC3rlswwYUeA_cdUESCMQo8rvq8k8n20N-oc-8w
Alright will take a look, is this bootloader specific?
Jeremy_J7 said:
Alright will take a look, is this bootloader specific?
Click to expand...
Click to collapse
Not sure.
If it doesn't work it might reboot into recovery and then you need to copy and paste your own /app and /priv-app folders back in place.
@jajk
Try this
@physwizz My appetite for being screwed by Samsung and the dirty traps they lay is severely diminished. Since going to U4, I can't reliably get TWRP to work without triggering the evil red text screen of death.... I have been watching what is happening with the work on custom kernels and Ultimate Pie ROMs but definitive information on what is actually working reliably or not is very patchy..... one person will say "Yep, this definitely works" the other will say "nope can't even boot"... almost like some people don't even own this phone or have not actually tried what they are promoting or are unable to follow instructions properly....
So....starting from stock U4, I can root and install TWRP, magisk and dmverity no problems at all but after going back into the O.S and attempting to reboot into recovery a 2nd time....bang! Samsung screws me!!!! The question is.....is there a custom kernel for U4 and above that truly removes all of Samsung's dirty tricks (security features) and a custom ROM that also holds no hidden surprises?
jajk said:
@physwizz My appetite for being screwed by Samsung and the dirty traps they lay is severely diminished. Since going to U4, I can't reliably get TWRP to work without triggering the evil red text screen of death.... I have been watching what is happening with the work on custom kernels and Ultimate Pie ROMs but definitive information on what is actually working reliably or not is very patchy..... one person will say "Yep, this definitely works" the other will say "nope can't even boot"... almost like some people don't even own this phone or have not actually tried what they are promoting or are unable to follow instructions properly....
So....starting from stock U4, I can root and install TWRP, magisk and dmverity no problems at all but after going back into the O.S and attempting to reboot into recovery a 2nd time....bang! Samsung screws me!!!! The question is.....is there a custom kernel for U4 and above that truly removes all of Samsung's dirty tricks (security features) and a custom ROM that also holds no hidden surprises?
Click to expand...
Click to collapse
If you're talking about the red text that talks about 'official binaries' when booting after you flash TWRP (FRP LOCK) then there's a very easy fix.
@physwizz Yes the evil red text...but it is not after flashing TWRP, it is only if you try to go back into TWRP.
I already know of one easy fix... called don't buy Samsung. All this wouldn't be a problem if manufacturers could resist the temptation to "monetize" private data but that ain't going to happen anytime soon in this dog eat dog world.....
jajk said:
@physwizz Yes the evil red text...but it is not after flashing TWRP, it is only if you try to go back into TWRP.
I already know of one easy fix... called don't buy Samsung. All this wouldn't be a problem if manufacturers could resist the temptation to "monetize" private data but that ain't going to happen anytime soon in this dog eat dog world.....
Click to expand...
Click to collapse
I got that because i was using old data
solved by doing a clean install
The data was then good in future
@physwizz Went through the Samsung dance from scratch, installed UltimatePie4, rebooted into Ultimate Pie no problems, completed the initial setup.....rebooted and back to red text of death!!!
Yes, I did all the format /data etc.... it is not a procedural problem on my part but my phone has always given me more grief than you appear to have - something is different
jajk said:
@physwizz Went through the Samsung dance from scratch, installed UltimatePie4, rebooted into Ultimate Pie no problems, completed the initial setup.....rebooted and back to red text of death!!!
Yes, I did all the format /data etc.... it is not a procedural problem on my part but my phone has always given me more grief than you appear to have - something is different
Click to expand...
Click to collapse
You didn't restore old data?
Clean install?
@physwizz Did nothing but complete the initial setup after install and rebooted.....all started from a clean install of U4, then rooted and TWRP from your tar file, then installed new ROM with data freshly formatted i.e. absolutely no messing around with the stock ROM or custom ROM through the entire process and never getting to the point of rebooting into TWRP which triggered the previous red text of death.....
jajk said:
@physwizz Did nothing but complete the initial setup after install and rebooted.....all started from a clean install of U4, then rooted and TWRP from your tar file, then installed new ROM with data freshly formatted i.e. absolutely no messing around with the stock ROM or custom ROM through the entire process and never getting to the point of rebooting into TWRP which triggered the previous red text of death.....
Click to expand...
Click to collapse
What does red writing say?
@physwizz Writing says "You have just been screwed by Samsung yet again" or something about official binaries which is the same thing....
jajk said:
@physwizz Writing says "You have just been screwed by Samsung yet again" or something about official binaries which is the same thing....
Click to expand...
Click to collapse
I've had that twice
1. When I forced reboot before UPie was finished installing
2 when I didn't wipe caches , data and system before installing UPie
Could also be Samsung Conspiracy Theorist Detection Program (SCTDP) lol

TWRP backup restore stuck in bootloop and different exotic issues (1913 Europe)

After my experiment of trying out Beta 3 of Android Q failed apocaliptical I tried to restore the backup I made minutes before. But no matter what I do, I keep getting:
- bootloops (straight rebooting after showing the unlocked bootloader warning)
- restart into recovery
- Oxygen OS loading animation stuck and animation being very slow
- not getting it anymore but had it yesterday in the early stages of my disaster management: Qualcomm Crash POST
Despite that the backup was generated succesfully (at least thats what TWRP said)
I tried almost every guide out there.
- switching to rm -rf
- restoring only data, only boot, only system and a mix of those
- flashing the OTA before restoring backup
- uninstalling magisk und reinstallating magisk (with and without separate reboots)
-multiple wipes of single partitions and data formatting
The only good thing is that I don't get the 255 error anymore I had at the beginng, allthough I don't really know anymore how I did it.
At the end I am only able to restore everything with the MSNTOOL out there.
Is there any golden hint to get the data the be restored? The backup of /data is critical as there my authenticator and banking data are in there.
Thank you in advance
Edit: As I am slowly getting fed up with OnePlus and the problems (proximity sensor, adaptive brightness, whatspps microphone, twrp issues, lacking tech guides if at all) I thought about migrating to Pixel 5. Is it possible to migrate the data partition? Or are all backup partitions strictily device specific?
anphex said:
After my experiment of trying out Beta 3 of Android Q failed apocaliptical I tried to restore the backup I made minutes before. But no matter what I do, I keep getting:
- bootloops (straight rebooting after showing the unlocked bootloader warning)
- restart into recovery
- Oxygen OS loading animation stuck and animation being very slow
- not getting it anymore but had it yesterday in the early stages of my disaster management: Qualcomm Crash POST
Despite that the backup was generated succesfully (at least thats what TWRP said)
I tried almost every guide out there.
- switching to rm -rf
- restoring only data, only boot, only system and a mix of those
- flashing the OTA before restoring backup
- uninstalling magisk und reinstallating magisk (with and without separate reboots)
-multiple wipes of single partitions and data formatting
The only good thing is that I don't get the 255 error anymore I had at the beginng, allthough I don't really know anymore how I did it.
At the end I am only able to restore everything with the MSNTOOL out there.
Is there any golden hint to get the data the be restored? The backup of /data is critical as there my authenticator and banking data are in there.
Thank you in advance
Edit: As I am slowly getting fed up with OnePlus and the problems (proximity sensor, adaptive brightness, whatspps microphone, twrp issues, lacking tech guides if at all) I thought about migrating to Pixel 5. Is it possible to migrate the data partition? Or are all backup partitions strictily device specific?
Click to expand...
Click to collapse
Try, booting into twrp... Format data. Type yes to format. Restore. Should boot.
@soka said:
Try, booting into twrp... Format data. Type yes to format. Restore. Should boot.
Click to expand...
Click to collapse
I did just exactly that on stock 10.0.0.11 to no avail, the TWRP restore went through fine but upon system reboot the phone stayed on the bootloader unlocked warning for about two minutes, then it rebooted straight into stock recovery.
It's beyond my understanding yet how the user data partition can cause the whole system to effing die.
My only hunch is that it has something to do with Magisk I had installed during the backup (encryption was disabled btw). But as I said I already tried running Magisk installer and uninstaller on different occasions with the same result. Also the only thing that should happen is that after restore and reboot the phone should tell me that Magisk isn't installed anymore.
Edit: So for now I reverted to full stock 10.0.11 and for the sake of experimenting I made a backup with system, boot and data of this stock rom and restored it succesfully. When I restore my actual data backup I get the same old restart and then it throws me back into TWRP. Is there any log I can check to see what's happening there?
Sorry for double post, but I think this might be very interesting for people with a similar problem as this seems to be very common with OnePlus phones.
So I found a very dirty and hacky way to get a least my most importants app running in the state they had during my backup I was trying to restore. Here's what I did, without any guarantee it might work for you or be stable in the end.
Code:
1. Revert the phone to a clean stock rom and update to the latest stable version (at the time of writing 10.0.11), it should be fully factory reset, aka like new. I am not sure but it may be necessary that you install the apps you want to restore first since the I am not sure the partition we use later contains the app AND the data too.
2. Unlock bootloader and flash latest TWRP, may it be official or mauronofio's
3. Make a backup of that current stock data partition
4. Restore data partition from your actual needed twrp backup (if it ends with 255, try to format data partition before in TWRP)
5. With the TWRP file manager navigate to the /data/data folder and copy everything to an external storage (I chose USB)
6. Restore the stock data partition
7. Now again with the TWRP file manager navigate to the /data/data folder on your external storage (should be /usbstorage) and search for the apps you need to restore (probably banking apps, authenticator, etc.), the name will be something like com.google.authenticator2.
8. Copy the folder of any needed app into the /data/data folder on your phone. Best you do it one by one just to make sure.
Now you can reboot to system. The apps should be fully restored. In my case it worked with Google Authenticator, Blizzard Authenticator, Consorbank Secure Plus (shows undefined error yet), Hue Pro. Maybe I will try more.
Edit: Consorsbank Secure Plus as you might guess is a tan generation banking app. When entering the pin when opening the app it shows "An error has occured". Dunno why, maybe a security checksum error or something. I found com.android.keychain and copied for the sake of trying too but it didn't help.
If you have any questions, suggestions or improvements, feel free to post!

Categories

Resources