Comments (23)
android sparse images
Android Sparse Image is only used for flashing system in bootloader now and there is no official way to modify it unless converting to raw image
But the issue remains, doesn't it?
I understand that 'theoretically' sparse images (like modules.img) should be supported and working fine, however most tools do not report the correct size on disk: for example, simply running 'ls -l' will report the img file to be 1TB.
Note that this is an issue on all devices, not only Oneplus devices.
Same on Android userspace in most cases (maybe not always, maybe not the settings).
Android sparse images actually report the correct size (they use metadata and such).
This 'modules.img' thing is breaking all sizes calculations.
from kernelsu.
If you need to backup, run ksud module shrink
first.
from kernelsu.
KernelSU_bugreport_2024-03-02_23_19.tar.gz
+1 here
having it on A13 though
I hope we can get this issue sorted
logs attached
from kernelsu.
OnePlus 5 | KSU v0.8.1 | OrangeFox Recovery
from kernelsu.
If you need to backup, run
ksud module shrink
first.
Where do you run this command? Terminal?
from kernelsu.
@tiann can you confirm 'where' in the code the sparse image is created?
I can see that the file is written here:
d7bc853#diff-585551bf35841dd58b217217af7af4a6946d512716cd1f88cb1f268abd455701R190
But there is no mention on sparse files there: it's just a file with the 'set_len' method called to force it to basically report 1TB, but it's not a sparse file.
From the command line:
$ file modules.img
/data/adb/ksu/modules.img: data
While with a sparse file (created with img2simg):
$ file test1tb.img
/sdcard/test1tb.img: Android sparse image v1.0, 1 4096-byte blocks (1 chunks)
Edit: to add more info, sparse images start with the '3aff 26ed' bytes (hexdump, xxd). I think this is the magic number of sparse images on Android. This is not the case of the modules.img file though, at least not on certain OnePlus devices.
Edit2: maybe there is 'a difference' between 'sparse images' and 'android sparse images', however as we are on Android..
from kernelsu.
If you need to backup, run
ksud module shrink
first.
After "ksud" command I can't install any module, I get the message that there is no space left on device. (os error 28)
Edit: After updating ksu 0.9.x the command works
from kernelsu.
android sparse images
Android Sparse Image is only used for flashing system in bootloader now and there is no official way to modify it unless converting to raw image
from kernelsu.
android sparse images
Android Sparse Image is only used for flashing system in bootloader now and there is no official way to modify it unless converting to raw image
But the issue remains, doesn't it?
I understand that 'theoretically' sparse images (like modules.img) should be supported and working fine, however most tools do not report the correct size on disk: for example, simply running 'ls -l' will report the img file to be 1TB. Note that this is an issue on all devices, not only Oneplus devices.
Same on Android userspace in most cases (maybe not always, maybe not the settings).
Android sparse images actually report the correct size (they use metadata and such).
This 'modules.img' thing is breaking all sizes calculations.
You can implement the library to modify Android Sparse Images and mount them like raw images.
Also, sizes calculations in Settings on MIUI & HyperOS is still correct like before.
from kernelsu.
If you need to backup, run
ksud module shrink
first.Where do you run this command? Terminal?
tried that method cant solve the problem, why not delete image.img before backup, and do before every u need backup?
from kernelsu.
If you need to backup, run
ksud module shrink
first.After "ksud" command I can't install any module, I get the message that there is no space left on device. (os error 28)
i got same problem, just recreated from that shrink will be half of 1 TB, and then if u want to install a module it will be 1 TB with more times, i dont know how much time
from kernelsu.
Excuse me, could you clarify this doubt for me:
-
This problem of changing storage values does not affect performance, right?
-
Will I be able to install apps normally until I use all my storage (128 GB)?
from kernelsu.
- The image file of KernelSU has been a sparse file since its inception, and this time it has been resized to 1T; so if your statistics are inaccurate now, the previous versions were actually inaccurate, but you didn't notice.
- When calculating file size,
du
should be used instead ofls
; as you can see, the sparse file only adjusts the file size withset_len
, and there are no other special operations. If the system's statistics are inaccurate, it is a problem with the system and should be fixed. - When you use
du
to check the size, you will find that it does not occupy so much space; but you cannot copy this file using normal methods. If you want to back it up, you need to executeksud module shrink
with a root shell first; also, if you update to this version: https://github.com/tiann/KernelSU/actions/runs/8136229760, it will automatically expand after you shrink it.
from kernelsu.
@tiann Out of curiosity, how did you settle on 1 TB for the size of the sparse file? A smaller, potentially less problematic size would not be sufficient?
from kernelsu.
Excuse me, could you clarify this doubt for me:
- This problem of changing storage values does not affect performance, right?
- Will I be able to install apps normally until I use all my storage (128 GB)?
yes and no, if u install a module, then u cant install app, because occupied 1 TB used untill free 0 MB
from kernelsu.
In the FAQ i added a few weeks ago this problem since all Samsungs are also affected #1389
from kernelsu.
I have the same problem on xiaomi device.. I always make a rescue data backup with modules and everything so deleting the img isn't going to cut it.. and of course it's impossible to backup with the 1TiB size.. so right now the only solution for me is to only flash modules with manager 0.7.6 which doesn't have this compatibility issue until twrp, ofrp, samsung, oneplus, etc. devs change the size calculation method on their end..
On 0.7.6 my data partition average size in recovery is 7 GiB, the modules.img is about 300MiB and the size is reported correctly.. if I flash anything with 0.8.0 both modules.img and modules_update.img report 1 TiB each..
from kernelsu.
I have the same problem on xiaomi device.. I always make a rescue data backup with modules and everything so deleting the img isn't going to cut it.. and of course it's impossible to backup with the 1TiB size.. so right now the only solution for me is to only flash modules with manager 0.7.6 which doesn't have this compatibility issue until twrp, ofrp, samsung, oneplus, etc. devs change the size calculation method on their end.. On 0.7.6 my data partition average size in recovery is 7 GiB, the modules.img is about 300MiB and the size is reported correctly.. if I flash anything with 0.8.0 both modules.img and modules_update.img report 1 TiB each..
I don't know if this tutorial will be of any use to you, or to someone who follows this thread...
https://www.youtube.com/watch?v=NYvCn_HnXLc
from kernelsu.
I have the same problem on xiaomi device.. I always make a rescue data backup with modules and everything so deleting the img isn't going to cut it.. and of course it's impossible to backup with the 1TiB size.. so right now the only solution for me is to only flash modules with manager 0.7.6 which doesn't have this compatibility issue until twrp, ofrp, samsung, oneplus, etc. devs change the size calculation method on their end.. On 0.7.6 my data partition average size in recovery is 7 GiB, the modules.img is about 300MiB and the size is reported correctly.. if I flash anything with 0.8.0 both modules.img and modules_update.img report 1 TiB each..
I don't know if this tutorial will be of any use to you, or to someone who follows this thread... https://www.youtube.com/watch?v=NYvCn_HnXLc
Perfect.. but when you install or remove modules it might be resized again to the hardcoded 1TiB value, maybe in kernelsu manager settings we could have the option to set the desired virtual img size and if trying to install a large module the manager would show a warning and ask the user to choose a larger size.. that way compatibility is kept and large modules are still supported based on the user choice with a simple setting in the gui, and the user choice is respected when installing new modules
from kernelsu.
I have the same problem on xiaomi device.. I always make a rescue data backup with modules and everything so deleting the img isn't going to cut it.. and of course it's impossible to backup with the 1TiB size.. so right now the only solution for me is to only flash modules with manager 0.7.6 which doesn't have this compatibility issue until twrp, ofrp, samsung, oneplus, etc. devs change the size calculation method on their end.. On 0.7.6 my data partition average size in recovery is 7 GiB, the modules.img is about 300MiB and the size is reported correctly.. if I flash anything with 0.8.0 both modules.img and modules_update.img report 1 TiB each..
I don't know if this tutorial will be of any use to you, or to someone who follows this thread... https://www.youtube.com/watch?v=NYvCn_HnXLc
Perfect.. but when you install or remove modules it might be resized again to the hardcoded 1TiB value, maybe in kernelsu manager settings we could have the option to set the desired virtual img size and if trying to install a large module the manager would show a warning and ask the user to choose a larger size.. that way compatibility is kept and large modules are still supported based on the user choice with a simple setting in the gui, and the user choice is respected when installing new modules
So, this process must be repeated every time you install a module?
And, does this not affect the functionality of the module?
from kernelsu.
So, this process must be repeated every time you install a module? And, does this not affect the functionality of the module?
Yes.. by the way the command above is easier
Just input ksud module shrink
in termux with root and the image is resized to physical size.. but any time you install or update a module it will become 1TiB again, and after shrinking if some of your modules have a dynamic size they might fail
from kernelsu.
In the FAQ i added a few weeks ago this problem since all Samsungs are also affected #1389
should be added and custom rom and xiaomeme device
from kernelsu.
So, this process must be repeated every time you install a module? And, does this not affect the functionality of the module?
Yes.. by the way the command above is easier Just input
ksud module shrink
in termux with root and the image is resized to physical size.. but any time you install or update a module it will become 1TiB again, and after shrinking if some of your modules have a dynamic size they might fail
@adhammagdy after this cmd all modules get removed
from kernelsu.
Related Issues (20)
- [Feature] Add option to randomize ksu manager package name HOT 1
- EACCES HOT 1
- Scrolling lists not propperly interpretted by screen reading services
- moto g54 android12-5.10.198_2024-01-boot-gz.img.gz可以运行 kernelsu 但是lkm方式就打开kernelsu显示未安装
- KernelSU does not ask to allow su access to certain apps with root capabilities HOT 6
- Is it possible to have KSU LKM with locked bootloader? HOT 1
- [2个小疑问]如何比较方便的从GKI模式切换到LKM? HOT 1
- Compilation error in clang-17 plz help sir HOT 1
- Install Error: create temp dir failed HOT 4
- qgki support
- 发送日志中的 “保存日志保存日志” HOT 1
- 魅族20Pro LKM模式 无法运行在0.9.5以及1.0.0版本下,0.9.4版本正常工作 HOT 10
- [Custom] 未能在官网指向页面找到ksud二进制下载链接 HOT 4
- 在ROOT权限下无法直接加载kernelsu.ko HOT 1
- 请教一下编译出来的内核刷入后正常运行但是不支持kernelsu会是什么原因呢? HOT 2
- Manager app not working after kernel flash HOT 2
- umount debug ramdisk failed HOT 1
- 非GKI设备在kernelsu管理面板中无法安装模块 HOT 2
- 红米Note13 5G HOT 1
- Non-GKI下的Xiaomi9,使用Lsposed会导致KSU无法显示RootList列表
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 kernelsu.