[Xiaomi Redmi 6 Questions & Answers] face-t:
I have almost finished setting up new Redmi 6.

After rooting, getting TWRP on the phone I have reinstated all apps trough TitaniumBackup. I have reinstated too many apps from TB and at some point I have removed 1 or 2 apps too many that I thought are only from TB...

Inside TB I went into system apps and deleted apps wit: Backup copy [APK + backup]. Before I realised that apps with backup were actually original Xiaomi appswas too late, I had few warnings later and phone rebooted but couldn't boot into system.

This way I got rid of:

com.android.providers.telephony

com.android.phone

:(

I could recreate what I have removed going into old phone and seeing which apps are backed up from system...

Can you help me to get apps back trough TWRP or FASTBOOT?

USB debugging was still on last time

My SD card is formatted as part of internal storage

TWRP File Manager can browse ROOT folder

It is newest ROM for Redmi6, [V10.3.6.0.OCGMIXM_], can someone provide copy of APKs please?

When in TWRP I mount system only, and try to [wipe dalvik] I get messages:

Failed to wipe dalvik

Updating partition details...

df /external_sd > /tmp/dfoutput.txt process ended with ERROR: 1

df /external_sd > /tmp/dfoutput.txt process ended with ERROR: 1

...done

Unable to mount storage

I almost will not loose any data, but:

if I can I'd like to move missing apps back to /app/data/ OR /system/app/ ? to recover system so it starts

if need be I will flash Xiaomi ROM and start from scratch but will loose many h of hard work on de-bloating etc [I hope that flashing original ROM will be easy since TWRP is working fine]

During TWRP - ADB sideload:

adb install com.android.phone.apk
error: device '(null)' not found
- waiting for device -

What can I do???

-------------------------------------------------------------------------------------

Turns out I had to flash original stock

Xiaomi guide is terrible and out of date, so:

there are prerequisites required, like ADB, drivers, that is well explained on Xiaomi site, then...

download original stock for fastboot >>> unpack folder XXX sitting inside 2 archives [it's not zip] >>> download/install and run XiaoMiFlash.exe >>> SELECT button - navigate to unpacked folder XXX >>> attach mobile >>> refresh = device will appear on list >>> FLASH

Read official xiaomi instructions on flashing original ROM just in case something will get updated

Why not any other way?

In TWRP it asked me for a password at the start

I couldn't get /system/ or /data/ mounted, wiped or formatted.

I have seen folks giving advice on how to do it, but often it didn't make sense or it didn't work.

I would be risking bricking new device by other methods & I had no more than 3 pictures to loose on flashing ROM and hours spent on doing up.

Interesting is, there really wasn't even one working advice on how to mount i.e. /system in TWRP when password is missing in booted operating system [like my case, I couldn't find any info on that, all at some point were going to advice to do something that required mounted /system or /data]

But then I just finished whole process of flashing stock ROM; I have set [1. simple password] then [PIN], went to TWRP, tried to use OS password/PIN and it didn't work, it didn't remove encryption .:eek:

----------------------------------------------------------------------------------------------------------------------------------------------

Found a solution on how to root the phone after all above.

After another Original stock ROM 10.3.6.0.OCGMIXM flash with XiaoMiFlash.exe, phone will automatically restart and start OS

But... I didn't let it to boot

Once it restarted I have pressed Vol- [button down] and waited for fastboot to load [no need to hold power button]

Installed TWRP 3.0.0.0

Restarted

Hold Vol+ [button up]

TWRP loads

CANCEL if asks for password

----------------------

INSTALL boot.img [when you flash stock ROM it is inside folder, just copy it across]

in MOUNT tick /vendor & /system

use back button to exit MOUNT

INSTALL Magisk 19.3.zip

clean dalvik cache and swipe

I have once again restarted to RECOVERY/TWRP

------------------------

When OS booted I couldn't run/start Magisk APK/aplication. Screen blinked and that's all. Root not working.

download Magisk Manager [7.3.4 in my case] from web & install

I could start application this time & it asked me to install something extra - I have chosen to install it right away

Magisk reboots phone

Now phone was finally rooted

---------------------

I used external USB attached to phone with files so I didn't need to copy files to phone.

This is much more convenient as after restarting to TWRP first time there is nothing on the phone and you would have to sideload.

---------------------------

Below is LibreOffice doc with ADB commands to uninstall bloatware. In the column next to uninstalling commands, are commands to instal same app back [I do not know will this always work since I tried only on few] [some missing - you can create it yourself]

Potentially further down the list there are more necessary apps. Uninstalling them did not cause problems in my set up, but sometimes they might be needed for less important stuff...

https://www.dropbox.com/s/xpfeh4wx1nv5dlf/Bloatware removal + SD as internal.ods?dl=0