android_device_xiaomi_libra icon indicating copy to clipboard operation
android_device_xiaomi_libra copied to clipboard

Issue with build lineage-18.1-20220819 + flamegapps 11 basic June build

Open dibyanugraha opened this issue 3 years ago • 3 comments

Hi,

I was on June build + flamegapps 11 basic june build, no root, no mods, just the rom + flamegapps basic, all things were working properly as usual then I decided to dirty flash lineage-18.1-20220819 build over the June. I don't use the latest flamegapps (august build) because I heard there are some issues with it, so I decide to stick to old June build.

First thing I noticed, after successfully flash the rom, I follow standard procedure to reflash gapps. To my surprise, twrp report it didn't have enough space to re-flash flamegapps (only few Kb left).

Then I noticed before flashing the rom, twrp report there's was an attempt to backup flamegapps + restore flamegapps right after flashing but not before flashing the real flamegapps zip.

I thought, well maybe flamegapps somehow survive the dirty flash with that auto backup + restore. I wipe the dalvik/cache, proceed to reboot. It can't enter system, it rebooted and entered twrp instead. I thought, okay, maybe some data were being messed up, so I decided to wipe data (not format) -- should be considered a clean flash then.

It booted, but weirdly skipped the gapps initialization wizard (first thing that usually happens after clean flash where you set the region, date/time, etc.). And phone acted weird as well, like notification bar cannot be expanded. Search bar on the settings is missing, and so on.

I haven't tried to rollback to July or even June to make sure only August build is broken, or my phone. I just flashed mokee 100.0 13 August build + flamegapps 10 basic, and to my surprise, no error in twrp, it booted perfectly, and everything is functional.

dibyanugraha avatar Aug 23 '22 14:08 dibyanugraha

I thought, well maybe flamegapps somehow survive the dirty flash with that auto backup + restore. I wipe the dalvik/cache, proceed to reboot. It can't enter system, it rebooted and entered twrp instead. I thought, okay, maybe some data were being messed up, so I decided to wipe data (not format) -- should be considered a clean flash then.

It's not necessary to do factory reset in such situations. The right way is to wipe /system and flash the ROM again, then the GAPPs. Most GAPPs will try to survive a ROM update using the scripts in /system/addon.d, if it doesn't work properly, delete the script (shouldn't be 50-lineage.sh) after installation.

It booted, but weirdly skipped the gapps initialization wizard (first thing that usually happens after clean flash where you set the region, date/time, etc.). And phone acted weird as well, like notification bar cannot be expanded. Search bar on the settings is missing, and so on.

If the setup wizard didn't finish properly, the device will not be provisioned. That's why this problem happened, just like force stopping Google Setup Wizard using some tricky ways. There are some ways to get out of this, either running the setup again or manually doing what it does should be OK.

  • Run shell command: settings put global device_provisioned 1 && settings put secure user_setup_complete 1 then reboot.

I haven't tried to rollback to July or even June to make sure only August build is broken, or my phone.

The changes between June and August version are mainly security patches, besides the back of EmergencyInfo app (10MB+). You could try if it works after format /system and reinstall the ROM/GAPPs.

BYZYB avatar Aug 24 '22 14:08 BYZYB

It's not necessary to do factory reset in such situations. The right way is to wipe /system and flash the ROM again, then the GAPPs. Most GAPPs will try to survive a ROM update using the scripts in /system/addon.d, if it doesn't work properly, delete the script (shouldn't be 50-lineage.sh) after installation.

Honestly, I never do /system wipe ever since KitKat cause I remember it messed up old twrp 2.x to unable to identify what device it's running on, had to remove device check on the zip script. I will try to do so.

If the setup wizard didn't finish properly, the device will not be provisioned. That's why this problem happened, just like force stopping Google Setup Wizard using some tricky ways. There are some ways to get out of this, either running the setup again or manually doing what it does should be OK.

Is it an intended behavour? In other devices flashed with same gapps, a factory reset/wipe data will always reset this settings -- that's why I thought once I have done it in twrp, the google setup wizard will run once I reboot. But this is not, that's why I was quite confused.

dibyanugraha avatar Aug 25 '22 02:08 dibyanugraha

Honestly, I never do /system wipe ever since KitKat cause I remember it messed up old twrp 2.x to unable to identify what device it's running on, had to remove device check on the zip script. I will try to do so.

It's safe to format /system and /cust on Mi-4c, nothing wrong should happen.

Is it an intended behavour? In other devices flashed with same gapps, a factory reset/wipe data will always reset this settings -- that's why I thought once I have done it in twrp, the google setup wizard will run once I reboot. But this is not, that's why I was quite confused.

Since you didn't wipe /system at that time, the backup/restore of GAPPs might be failed due to no space left (only a few KB, as you said). I think some components of GAPPs were missing after that (eg. some libs were not restored after running out of space), which made Setup Wizard failed to start. It should not happen if the free space is enough, but the /system partition on Mi-4c isn't (especially for new Android versions).

BYZYB avatar Aug 25 '22 13:08 BYZYB