Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
KhazAkar opened this issue Apr 19, 2024 · 17 comments
Open
Assignees
Labels

Comments

@KhazAkar
Copy link

KhazAkar commented Apr 19, 2024

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
Copy link
Member

ale5000-git commented Apr 20, 2024

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
Copy link
Author

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

@KhazAkar
Copy link
Author

KhazAkar commented Apr 20, 2024

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

@KhazAkar KhazAkar changed the title Can't install on 4.4.4 tablet Can't install on 4.4.4 tablet due to missing $RANDOM generation method. Apr 20, 2024
@ale5000-git
Copy link
Member

ale5000-git commented Apr 20, 2024

@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
Copy link
Author

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

@ale5000-git
Copy link
Member

ale5000-git commented Apr 20, 2024

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

Edit: Link removed

@KhazAkar
Copy link
Author

KhazAkar commented Apr 21, 2024

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
Copy link
Member

ale5000-git commented Apr 21, 2024

@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
Copy link
Author

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
Copy link
Member

ale5000-git commented Apr 23, 2024

@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
Copy link
Author

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
Copy link
Author

KhazAkar commented Apr 23, 2024

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
Copy link
Member

ale5000-git commented Apr 23, 2024

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
Copy link
Author

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
Copy link
Member

ale5000-git commented Apr 26, 2024

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

  • "com.android.acore" crashing on start => please open a separate issue for this.
  • logging is quirky => What do you mean? The log currently can't activate too early but usually there isn't any problem this early (the issue with random is really a rare case).
  • GPlay => What is the problem?

@KhazAkar
Copy link
Author

  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
Copy link
Author

KhazAkar commented May 20, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants