micro5k / microg-unofficial-installer

microG unofficial installer - it installs microG on Android
https://forum.xda-developers.com/showthread.php?t=3432360
GNU General Public License v3.0
162 stars 20 forks source link

Can't install on 4.4.4 tablet due to missing $RANDOM generation method. #91

Open KhazAkar opened 2 months ago

KhazAkar commented 2 months ago

What happened?

Hi! I'm running Alcatel Pop 8s with CM11 (KitKat 4.4.4). I know, it's ancient, but I wanted to revive it and have microG running. I'm unable to install it via sideload, because of such error:

ERROR 79: $RANDOM is not supported

Version

1.3.1-beta

Android version

4.4.4

Custom ROM

CyanogenMod 11

Relevant log output

No response

ale5000-git commented 2 months ago

Hi, I didn't expect anyone to have this error, but it should be easy to fix.

Could you please try this and report back?

Edit: Link removed

KhazAkar commented 2 months ago

Same error code, but got different log - "ERROR 79: Unable to generate a random number"

KhazAkar commented 2 months ago

What's more interesting is that I can see in /dev after doing adb shell in recovery /dev/urandom and /dev/zero ... interesitng.

ale5000-git commented 2 months ago

@KhazAkar What are missing are the other things.

Could you please run these in adb shell and tell me the result of every line?

command -v shuf; echo $?
command -v awk; echo $?
command -v date; echo $?
date -u -- '+%N'
command -v tr; echo $?
command -v head; echo $?
command -v dd; echo $?
command -v hexdump; echo $?
command -v od; echo $?
od --help
KhazAkar commented 2 months ago

@ale5000-git sorry for screenshot, but I hope is everything visible :) image

ale5000-git commented 2 months ago

@KhazAkar Could you please retry with this and report back?

Edit: Link removed

KhazAkar commented 2 months ago

Went further, but now got a different error. Should I create a different bug ticket, or we will continue here? Log retyped from display below:

Finding update package...
Opening update package...
Installing update...
Found 'system' block at: /dev/block/mmcblk0p27

Verity mode: disabled
Dynamic partitions: false
Current slot: no slot
Recov. fake system: true

Android root ENV: /system

ERROR 91: The ROM cannot be found!
ERROR 91: Installation script failed
E:Error in /tmp/update.zip
(Status 91)
Installation aborted.
ale5000-git commented 2 months ago

@KhazAkar We can continue here in this ticket but I need the full log.

Could you please try this version (the log is enabled by default)?

You will see a line like this (path may be different): Creating log: /sdcard1/debug-a5k.log

Then after the flashing is ended you just need to get the file with: adb pull "/sdcard1/debug-a5k.log" debug-a5k.log

And post it here.

Edit: Link removed

KhazAkar commented 2 months ago

I've pulled debug-a5k.log as well, as recovery.log. debug-a5k.log doesn't contain that much more than I gave above. This tablet seems to use /tmp for sideload. recovery.log debug-a5k.log

ale5000-git commented 2 months ago

@KhazAkar

Could you please post the result of this? adb shell "ls -laR /system"

Since it may be big it may be better to save to file with: adb shell "ls -laR /system" > file_on_the_pc.txt

KhazAkar commented 2 months ago

When not mounted:

/system:
__bionic_open_tzdata: couldn't find any tzdata when looking for localtime!
__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
drwxr-xr-x    3 root     root             0 Jan  1  1970 .
drwxr-xr-x   23 root     root             0 Feb 26 13:41 ..
drwxr-xr-x    2 root     root             0 Jan  1  1970 bin

/system/bin:
drwxr-xr-x    2 root     root             0 Jan  1  1970 .
drwxr-xr-x    3 root     root             0 Jan  1  1970 ..

When mounted - file attached all_system.txt

KhazAkar commented 2 months ago

It seems that now it works fine. Skill issue on my side, sorry! :D After mounting manually system it installed now. Maybe auto-mounting /system when it's not mounted would be a good idea, or having it in docs? BTW, where can I give you some $$ for your work? I wanted to appreciate it somehow your dedication to help me :)

ale5000-git commented 2 months ago

It already has auto-mounting of /system but currently it does have an issue in your specific case but I will fix it soon.

Thanks for your reports too; I like programming and I want to fix all issues, no matter what it is. To donate there is a "Sponsor" button with all donations methods in this page: https://github.com/micro5k/microg-unofficial-installer

KhazAkar commented 2 months ago

Only thing left is that I get "com.android.acore" crashing on start, plus logging is quirky, and GPlay, but that I can handle in different ticket. At least it works now :)

ale5000-git commented 2 months ago

The issue with automounting was that the "System mountpoint list" was empty. Usually there are 2 cases: 1) Under the "/" mountpoint there is an empty system folder that is used as mountpoint for the real system partition; 2) Under the "/" mountpoint there is a system folder with inside a bin folder; if it is used as mountpoint then binaries under /system/bin (from the "/" mountpoint) are no longer usable. So in this cases my installer avoid using /system to mount the partition. In this second case usually there is a /mnt/system mointpoint that can be used but in your case it is missing.

Now I have changed the code to use a fallback mountpoint if there isn't anyone usable and it should fix automounting on your device. Could you please try it and report back? https://share.freepro.com/978586bf-0f1a-40de-bf4b-4e6115dd5d9d

About the other issues

KhazAkar commented 2 months ago
  1. Sure, will check it out whether possible.
  2. Sure, will open separate ticket for that when it will rise again
  3. Logging in is quirky - sorry for misspelling. It wasn't ending the procedure of logging in to the account, but after skipping I was logged in.
  4. Before reboot it was unable to open the application.
KhazAkar commented 1 month ago

Hello! i'm sorry it took so long. I've tested that zip and it appears to be working. Currently it detects my device as 32 bit only. Qualcomm Snapdragon 410 AFAIK is 64 bit cpu. Is it because underlying android is probably 32 bit or something else?

EDIT: as of acore thing - it's android.process.acore specifically. During initial screen. Will create ticket for that.