[D5503] Lollipop 5.1.1 goes AICP 13.1 Oreo 8.1 /// Beginners Link Collection

derjango

Senior Member
May 8, 2018
59
9
0
Hello hello,

this will be my "live" thread of bringing AICP 13.1 to my xperia z1c, I found some Guide's that I will follow and I will share with you all the links and knowledge I gained as a newbie that I used to understand and fix my problems on the way.
Maybe this will help you, too.

Main Tutorial: LINK
Target of all this: LINK

My Device:
Sony XPERIA Z1C, 14.6.A.1.236 , Lollipop 5.1.1

My best hint: read carefully, take your time to understand what you're trying to do and do your own research!

Hopefully you will get a aicp custom rom out of it.


_____________________________________________
_____________________________________________


General information: Android 5.1.1 cannot be rooted due to its high security standards, therefore we will downgrade to a lower security stock rom and create root access there. Root access will be needed as well as an unlocked bootloader to install real recovery (TWRP) which is the tool to flash custom roms like aicp. But the aicp custom rom will not have a good working camera, don't ask me why, but the camera seems to be a really difficult thing from the point of developer's view, let's accept this. Aside of that disadvantage, this custom rom is a very nice software and it makes my z1c kind of new. I don't use my camera anyway often at all.

During all this flashing thing I had a very big ??? while implementing real recovery. I was able to flash the .236.ftf but not the openbootloader.ftf as described in section 5 in the main tutorial. The result was twrp boot failed.

Error description:
flash .236.ftf works
flash openbootloader fails
flash twrp works
boot twrp fails
boot stock rom works

My solution:
I restarted from scratch and finally with the kind of messed up secquenceI got it:
flash .236.ftf works
flash openbootloader fails
flash twrp works
boot twrp fails
flash openbootloader works
flash twrp works
boot twrp works

UPDATE 06.12.2018 as a solution for REAL RECOVERY with working camera <<< RECOMMENDED
0. boot into rom works
1. flash openbootloader works
2. boot into rom works
3. flash .236.ftf works
4. boot into rom & check camera works
3. flash twrp ( business as usal ) works
4. boot twrp ( First boot is damn important, don't miss it! Press Vol- & Power, wait for vibration, release Power & keep Vol- until twrp boots up ) works
5. full wipe, flash aicp-rom, flash gapps, flash magisk-root, boot system works
6. enjoy Oreo 8.1 & camera check !!! works !!!

This routine worked straight forward for me where I started from scratch with my second device.

Flashing aicp was pretty easy, good to know for flashing the rom was full wipe = advanced wipe and select everything except of micro sd

To complete my aicp 13.1 Oreo 8.1 device the camera problem has to be fixed ( Saving the taken picture fails, display goes into freeze, no chance to solve this with camera mods, camera apps )
But @lm089 gave me the right hint, and finally this was my solution! Thanks again @lm089!!


Have fun with your new >> SONY XPERIA Z1 COMPACT <<

How to update TWRP


1. Turn Off your device
2. Start device in fastboot mode by connecting via usb cable to your pc and press Vol- until blue led tuns on
3. use fastboot flash recovery twrp.img to flash it
4. boot twrp ( This first boot is damn important, don't miss it! Press Vol- & Power, wait for vibration, release Power & keep Vol- until twrp boots up ) works

How to update to aicp 14.0 pie 9.0

starting with the running and latest aicp 13.1 oreo 8.1 rom above I just followed the Instructions here. As a specialty I had to install the Magisk Manager App manually into the rom to get root. Downloading supersu.apk from www.supersuroot.org works fine as well.

Your fastboot connection doesnt work for some reason though u had this workin fine in the past? maybe u had a windows update. install your drivers again.

>> LETS KEEP THIS DEVICE ALIVE <<

_____________________________________________
_____________________________________________

More helpful links that I used:
Debug apps by creating logs
what is adb? an xda tutorial
ADB working Download Link and ADB Article on xda
xda flashtool error during setup: click
[NOOBIE] Basic adb commands and device partition overview
Latest TWRP 3.2.3-0 for z1c
root solution using flash tool
Restore DRM functionality after UB
If TA Backup dry restoration restoration fails: Solution and Download *.dll
Boot into recovery or fastboot mode
How to install TWRP
Magisk beats superSU
How to Install Custom ROM using TWRP for Android!
change boot animations
[TUTORIAL] Design Your Own Bootanimation
Backup & Restore Your ROM With TWRP
Terminology: odex and deodex
If the camera goes into freeze or saving the picture fails: This was my solution! /// But you better go straight with the steps of my update 06.12.2018, field tested!


THANKS A LOT TO @colaigor for his [BEGINNERS GUIDE]
 
Last edited:
  • Like
Reactions: colaigor and lm089

zlata

Senior Member
Apr 28, 2014
105
27
48
Ok. So i dont have much time now but i can give some short directions.
1. Get unlock codes from sony for bootloader unlock
2. Instal adb and fastboot at your system(PC)
3. Instal z1c drivers
4. Instal flashtool
5. Unlock bootloader,root,flash recovery(search forum for "real recovery" ),flash root solution
6. Flash wanted rom,gaps
P.P. On second thought u dont need flashtool. All can be done with adb and fastboot commands from terminal
 
Last edited:
  • Like
Reactions: derjango

derjango

Senior Member
May 8, 2018
59
9
0
There is one thing I don't understand:
what is the difference between FLASHING REAL RECOVERY and FLASHING FAKE RECOVERY?

What I read is, that in both cases I get TWRP but on different partitions (real = Recovery Partition, fake = Boot partition) but do I need both or do I choose just on of them?
 
  • Like
Reactions: colaigor

zlata

Senior Member
Apr 28, 2014
105
27
48
There is one thing I don't understand:
what is the difference between FLASHING REAL RECOVERY and FLASHING FAKE RECOVERY?

What I read is, that in both cases I get TWRP but on different partitions (real = Recovery Partition, fake = Boot partition) but do I need both or do I choose just on of them?
Real recovery have its own partition(after that update to bootloader). Custom recovery dont have that and its stored somewhere else(FOTA,onetime boot image , etc). Choose real recovery. New stuff works good with it.
 

derjango

Senior Member
May 8, 2018
59
9
0
flashtool log of openbootloader.ftf failed:
01/015/2018 13:15:58 - INFO - Device connected in flash mode
01/017/2018 13:17:19 - INFO - Selected Bundle for Sony Xperia Z1 Compact(D5503). FW release : 1. Customization : openbootloader
01/017/2018 13:17:19 - INFO - Preparing files for flashing
01/017/2018 13:17:19 - INFO - Please connect your device into flashmode.
01/017/2018 13:17:19 - INFO - Using Gordon gate drivers version 3.1.0.0
01/017/2018 13:17:20 - INFO - Opening device for R/W
01/017/2018 13:17:20 - INFO - Device ready for R/W.
01/017/2018 13:17:20 - INFO - Reading device information
solved, I skipped step 5.2, flashing the .236.ftf in advance

but how can I start TWRP?
doesnt work with POWER + Vol-, vibrate & release power

I tried to flash the following recovery solution using this command:

smartphone in fastboot mode (blue LED enabled)
fastboot flash recovery recovery.img

TWRP from step 5.1 of the GUIDE
TWRP 3.0.2

My formerly flashed .236.ftf rom works fine, but I cant start TWRP :confused: the device goes directly to my rom
 
Last edited:

derjango

Senior Member
May 8, 2018
59
9
0
Real recovery have its own partition(after that update to bootloader). Custom recovery dont have that and its stored somewhere else(FOTA,onetime boot image , etc). Choose real recovery. New stuff works good with it.
Thats where I'm stuck right now, any ideas how to fix?
 

derjango

Senior Member
May 8, 2018
59
9
0
okay got it, basically i do not know what the problem is but:

after BLU

flash .236 :good:
flash openbootloader :(
flash twrp :good:
--> failed to install openbootloader and probably thus twrp failed

solution: I skipped to flash .236 as recommended by the author of the GUIDE (step 5.2)

flash open bootloader :good:
flash twrp :good:
--> failed to start twrp, though it was installed successfully :(

flash .236 :good:
flash openbootloader (failed again, but it's already on the device and I guess I could have skipped this here) :(
flash twrp :good:
first boot of twrp is successful :good:

And basically the author explained it in his text, FIRST INSTALL OPEN BOOTLOADER BEFORE WRITING STH TO RECOVERY PARTITION
 

derjango

Senior Member
May 8, 2018
59
9
0
@lm089 Haha it's quite some work to get into it, right? ;) I just saw that we are running on the same device & custom rom, how did you solve the issue with the not working camera? I'm still reading stuff about some mod, but I'm curious and open for tested solutions on z1c

best, dj
 

lm089

Senior Member
Jun 26, 2011
451
149
73
Munich
how did you solve the issue with the not working camera? I'm still reading stuff about some mod, but I'm curious and open for tested solutions on z1c

best, dj
Had this situation twice with 2 different oreo ROMs. Both times I solved it following a rather strange sounding suggestion I found on the AICP 13.1 discussion thread. The basic idea is to go back to a stock Sony ROM. Boot into it and make sure the camera is working which for me was the case both times. Then - if necessary - re-root your phone (on first occasion I flashed a pre-rooted .236 version but that caused some extra trouble so next time I decided to flash an unrooted version). And from then on it's the standard way as you described it in your OP.


Good luck!
 
  • Like
Reactions: derjango

derjango

Senior Member
May 8, 2018
59
9
0
Okay, thanks a lot for your hint! Unfortunately the camera mod didn't fix the problem, my android-task for this evening is defined:

AICP 13.1 Oreo 8.1 on z1c, root, ulb, magisk 17.1
1. backup my system (done)

2.0 flash stock rom lollipop 5.1.1 (14.6.A.1.236.ftf) with flashtool via usb (done),booting the os for the first time takes quite long (~10m), check camera in the os (done)

interesting fact: recovery is deleted by flashing the rom via flashtool - I thought I can go the lazy way and skip the step of installing twrp again into recovery :D

2.1 okay, let's do it: install twrp (done) and boot into twrp, NOT into ROM!! (done) (Vol- & Power, wait for vibration & release Power but keep Vol- until TWRP starts up)

3. flash aicp 13.1 following this (full wipe as an advanced wipe: select all EXCLUDING THE SD STORAGE)
Again here, I recognized the first boot of the rom takes quite longer.

4. check camera (done)

!!!! IT WORKS !!!!

(I did it two times)
 
Last edited:

lm089

Senior Member
Jun 26, 2011
451
149
73
Munich
btw @lm089, boots your ota-updater directly into twrp and start the flashing procedure? In my case I had to boot twrp manually and flash the zip manually, too
No, updater is booting into recovery, doing a nandroid backup and wiping caches (because I told it to), then flashing and finally rebooting into system. All by itself :good:

I remember having trouble with that in the past though. Do you by any chance have an SD card formatted as adoptable storage?
 

derjango

Senior Member
May 8, 2018
59
9
0
No, updater is booting into recovery, doing a nandroid backup and wiping caches (because I told it to), then flashing and finally rebooting into system. All by itself :good:

I remember having trouble with that in the past though. Do you by any chance have an SD card formatted as adoptable storage?
Yes, its used as an external storage
 

underflash

Senior Member
Oct 19, 2018
79
6
8
1) How to unlock bootloader:
https://developer.sony.com/develop/...ed/unlock-bootloader/how-to-unlock-bootloader

2) Download Platform-tools (adb & fastboot) r.26.0.2 as latests version does not work (or just for me):
https://xiaomifirmware.com/downloads/download-platform-tools-adb-fastboot-r-26-0-0/

3) Download TWRP 3.2.3-0 https://androidfilehost.com/?fid=11410963190603854057 and place file in Platform Tools folder on PC

4) Restart in fastboot mode and flash revovery:
fastboot flash recovery Z1C_twrp_3.2.3-0.img
fastboot reboot

5.1) Download AICP Oreo 8.1 http://dwnld.aicp-rom.com/device/amami/WEEKLY/aicp_amami_o-13.1-WEEKLY-20181204.zip and place file in Platform Tools folder on PC
5.2) Download Gapps Pico https://opengapps.org/?download=false&arch=arm&api=8.1&variant=pico and place file in Platform Tools folder on PC
5.3) Download stable Magisk 17.1 https://github.com/topjohnwu/Magisk/releases/download/v17.1/Magisk-v17.1.zip place file in Platform Tools folder on PC

6.1) Load TWRP. Advance>ADB Sideload (for Oreo)
adb sideload aicp_amami_o-13.1-WEEKLY-20181204.zip
(do not restart)
6.2) Repeat Advance>ADB Sideload (for Gapps)
adb sideload open_gapps-arm-8.1-pico-2018XXXX.zip
(do not restart)
6.3) Repeat Advance>ADB Sideload (for Magisk)
adb sideload Magisk-v17.1.zip
(restart)
 
Last edited: