Comments (8)
(Forgotten vbmeta.img in the previous post)
from android_universal.
It seems the Windows version hasn't the pipe problem, but cannot read a file that must be created by the script :
from android_universal.
Can you share the boot.img ? Might have a look then
from android_universal.
Thank you !
If the problem really originates from unpacking initfs, the broken pipe might be linked since it's exactly at the same place ( p.stdin.write(rdcpio) ) :
from android_universal.
Maybe it's because the Android phone is A/B device. (Fairphone 3)
Inside makeramdisk.py :
The script is writing hdrsize if the header version is superior than 0 :
But this variable is read from the image only if a header version of 2 is detected :
According to the bootimg.h, hdrsize is part of header version 1 too : (https://android.googlesource.com/platform/system/tools/mkbootimg/+/refs/heads/master/include/bootimg/bootimg.h)
I should signal another thing, the init file is extracted from rd.gz as init@0755 under /system/bin and not under / as init@0750 :
from android_universal.
I have managed to modifiy the program in order to complete the process.
First, according to bootimg.h, I have modified this part of makeramdisk.py :
I have changed the path to the folder /keys. The program was searching it under android_universal\root\scripts\Library\utils\keys (that doesn't exist) while this folder already existed under /root/keys
I have set up the arg use_persistent_digest to True for the function add_hash_footer (avbtool3.py) :
Because this one was created from reading /dev/urandom that doesn't exist on Windows.
So now the program terminates and creates a boot.img.signed. But when I flash it, I cannot retrieve any thing linked to the patch. (None of the .sh's are under /sbin, init.rc doesn't have the "on eary-init" that will import init.shell.rc... etc through TWRP) So nothing seems to work, any idea ?
Note : I failed to correct the error concerning init @0750.
from android_universal.
I presume the difference between the two mods (0750 vs 0755) is normal. I will adapt the script to patch this init@0755 because it seems the A/B devices have normally their init under /system/bin :
Modification :
Now the patching is working, but once patched, I don't have any open ports for netcat. If I browse through the filesystem with TWRP, I cannot find any traces of the modification.
from android_universal.
In fact, it seems the kernel doesn't load the ramdisk at all. (I have tried boot_a and boot_b)
I think it is linked to the boot method in some ways since the init is clearly under /system/bin but the device was not originally under Android 10. What would explain this behavior ? @bkerler
from android_universal.
Related Issues (11)
- no root after patch boot.img HOT 1
- Android 11: Could not open file init@0750, init.rc@0750: No such file or directory HOT 3
- broken pipe issue
- FileNotFoundError: [Errno 2] No such file or directory: 'tmp/rd.gz' HOT 2
- hello HOT 3
- Could not use this tool HOT 4
- ModuleNotFoundError: No module named 'Crypto.Util.asn1' HOT 2
- I Don't see boot.patched after the script is finished HOT 1
- A
- Couldn't find any valid sepolicy file. Aborting....
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android_universal.