[HUAWEI] Offline charge fix for every Huawei Treble Enabled Phone - Treble-Enabled Device Development A/AB ROMS

Huawei, again, wew.
At the moment, charging offline while on GSI, reboots the phone to the OS.
So, let's simply fix that by:
Downloading this zip;
Pushing it by any means* in the path /vendor/etc/charger (please don't create duplicates path like /vendor/etc/charger/charger, make sure you do it correctly)
Execute:
Code:
ln -s /vendor/etc/charger /system/etc/charger
*You can actually use adb within OS:
adb root
adb remount
adb push​or you can mount all partitions within TWRP Mount option, and just push the dir via adb.
Peace.

Dil3mm4 said:
Huawei, again, wew.
At the moment, charging offline while on GSI, reboots the phone to the OS.
So, let's simply fix that by:
Downloading this zip;
Pushing it by any means* in the path /vendor/etc/charger (please don't create duplicates path like /vendor/etc/charger/charger, make sure you do it correctly)
Execute:
*You can actually use adb within OS:
adb root
adb remount
adb push
or you can mount all partitions within TWRP Mount option, and just push the dir via adb.
Peace.
Click to expand...
Click to collapse
Error pushing on adb, Doesn't work on mate 9,will appreciate if you provide more instructions for installation.
Thank you!

The partitions are mostly to small partitioned... On honor 9 lite i used product partition instead...
Its not forever... every dirty flash on system or updating vendor security patch level will drop it. A magisk module dont work cause its mounted to late...

Darkest-Dark said:
The partitions are mostly to small partitioned... On honor 9 lite i used product partition instead...
Its not forever... every dirty flash on system or updating vendor security patch level will drop it. A magisk module dont work cause its mounted to late...
Click to expand...
Click to collapse
"Nothing lasts forever and we both know hearts can change"
-Guns 'N' Roses
Anyways, yeah, updates on vendor will wipe this "hack".
But, better than nothing

No need for this if you wipe data with stock recovery and then flash ROM + GApps, and then factory reset in stock recovery. My phone chargea fine in "offline mode."

Dil3mm4 said:
"Nothing lasts forever and we both know hearts can change"
-Guns 'N' Roses
Anyways, yeah, updates on vendor will wipe this "hack".
But, better than nothing
Click to expand...
Click to collapse
Directly modifying /system/etc/charger also seems to be effective.Could you make it into a magisk module?

Ccboxes said:
Directly modifying /system/etc/charger also seems to be effective.Could you make it into a magisk module?
Click to expand...
Click to collapse
Here's your answer. Read the thread first.
Darkest-Dark said:
A magisk module dont work cause its mounted to late...
Click to expand...
Click to collapse

Thanks for this Fix. Works awesome on Mate 10 lite with RR Official.
I installed on other way cause ADB provided to many Error Messages.
Downloaded ZIP
Extraxted ZIP File
Copied the extracted Folder to /vendor/etc/ with Root Explorer. (Asked me to mount as R/W. Says YES)
This Takes some minutes.
Rebooted to TWRP, mounted system and vendor
Opened the TWRP Terminal and executed the Command
ln -s /vendor/etc/charger /system/etc/charger
Done and works awesome Thank you Dil3mm4 !

Dil3mm4 said:
Huawei, again, wew.
At the moment, charging offline while on GSI, reboots the phone to the OS.
So, let's simply fix that by:
Downloading this zip;
Pushing it by any means* in the path /vendor/etc/charger (please don't create duplicates path like /vendor/etc/charger/charger, make sure you do it correctly)
Execute:
Code:
ln -s /vendor/etc/charger /system/etc/charger
*You can actually use adb within OS:
adb root
adb remount
adb push​or you can mount all partitions within TWRP Mount option, and just push the dir via adb.
Peace.
Click to expand...
Click to collapse
Hey,
I did everything like destriben, but it did not work for my Mediapad M5,
it still boots up when I wanted to change while my device is powered off.

anyone to tell me how i can use this on aosp 8,1 treble rom ? i am new on huawei, treble rom ... thanks

leap_ahead said:
anyone to tell me how i can use this on aosp 8,1 treble rom ? i am new on huawei, treble rom ... thanks
Click to expand...
Click to collapse
anyone ?

leap_ahead said:
anyone ?
Click to expand...
Click to collapse
Dude, there is this new term called reading the thread, i know it's a bit hard to take in at first, but you'll get the hang of it. If you can't read, then you shouldn't be here.

This cause reboot constantly.
i've p8 lite 2017 (Pra-LX1) with GSI 8.1

crayonicle said:
Dude, there is this new term called reading the thread, i know it's a bit hard to take in at first, but you'll get the hang of it. If you can't read, then you shouldn't be here.
Click to expand...
Click to collapse
I read the instruction.but many user and me have problem with this,
so its not my false

leap_ahead said:
I read the instruction.but many user and me have problem with this,
so its not my false
Click to expand...
Click to collapse
if many users, including you, that have this problem, then all of you should read the thread, again and again until you understand
the instructions are very clear on what to do.

Everytime we flash a new system image this command has to be executed, right @Dil3mm4?
Will it work if @phhusson includes the "ln" command to the script rw-system.sh, after identifying the device as an Huawei device?

that`s good

I have already post a second variant of tutorial. Works 100% and its easy.
TUT 2:
Downloaded ZIP
Extraxted ZIP File
Copied the extracted Folder to /vendor/etc/ with Root Explorer. (Asked me to mount as R/W. Says YES)
This Takes some minutes.
Rebooted to TWRP, mounted system and vendor
Opened the TWRP Terminal and executed the Command
ln -s /vendor/etc/charger /system/etc/charger
Reboot and done

Copkiller2010 said:
I have already post a second variant of tutorial. Works 100% and its easy.
TUT 2:
Downloaded ZIP
Extraxted ZIP File
Copied the extracted Folder to /vendor/etc/ with Root Explorer. (Asked me to mount as R/W. Says YES)
This Takes some minutes.
Rebooted to TWRP, mounted system and vendor
Opened the TWRP Terminal and executed the Command
ln -s /vendor/etc/charger /system/etc/charger
Reboot and done
Click to expand...
Click to collapse
same things done but not working, huawei p20 lite android 10

I have this offline charging problem also in my Lenovo s5.

Related

ClockworkMod Recovery v6.0.2.7 (based on CM10 - Android 4.1.2 JZO54K) kernel 3.0.31

So there it is. It incorporates two workarounds:
gr_init() called twice to fix the black screen problem
small kernel patch to allow param.ko to update params.blk inside /mnt/.lfs before rebooting
This is very preliminary work. I can not provide any guarantee it will not brick your device or cause a rift in the space-time continuum (it hasn't bricked mine or caused a rift but that's statistically insignificant).
I recommend you flash this recovery with dd and not Odin/heimdall after rooting with the system.img method (see http://forum.xda-developers.com/showthread.php?t=2104638), but be careful with the partition number (for example if you forget the number 2 and type mmcblk0p1 you will end up rewriting your partition table, thus bricking your device).
Before flashing anything, consider making a backup of the original recovery partition (other partitions can be backed up as well: EFS, modemfs, etc. see http://forum.xda-developers.com/showthread.php?t=2032642)
Code:
dd if=/dev/block/mmcblk0p21 of=/sdcard/backup-recovery.img
Then install CWM:
Code:
dd if=/sdcard/recovery-clockwork-6.0.2.7-golden-2.img of=/dev/block/mmcblk0p21
or if you copied the file on the external sd:
Code:
dd if=/storage/extSdCard/recovery-clockwork-6.0.2.7-golden-2.img of=/dev/block/mmcblk0p21
Update: version 2 that works with both internal and external sdcard. If you want to use the external SD, it must be formated with one FAT32 partition (mmcblk1p1). Make sure to repartition/reformat your SD if this is not the case! This can be done in the systems parameters of the phone, or alternatively under Windows/Linux.
Here is an Odin flashable package made by spawk (thanks to him): http://forum.xda-developers.com/showpost.php?p=36962108&postcount=59 Contrary to the method above, flashing with Odin (or Heimdall) will increase your download count!
To reboot into recovery, you can either :
- use the vol-up + home + power combo, but it does not work on all phones (reason unknown)
- with stock, use ROM Manager to reboot into recovery
- with CM10, well simply select recovery when rebooting
- with adb enabled, run "adb reboot recovery"
If your current system fails to boot, and you need to get into recovery, and the three-button combo does not work, you can always reflash a known working system.img and use one of the methods above.
Adb sideloading does not seem to work. Need to investigate why
so just flash it? thats it? and we will have working display?
Can u provide more info? Becuase i think some users will not understand the procedure
Men can you provide the device tree and your changes on kernel so I can merge them on my repos?
Enviado desde mi GT-I8190 usando Tapatalk 2
OliverG96 said:
Men can you provide the device tree and your changes on kernel so I can merge them on my repos?
Click to expand...
Click to collapse
There are no kernel changes. I just used GT-I8190_JB_Opensource_Update1.zip with the golden_defconfig
You need to update graphics.c and android_reboot.c (attached). I will upload the device tree a bit later, need to clean it up first.
xd.bx said:
There are no kernel changes. I just used GT-I8190_JB_Opensource_Update1.zip with the golden_defconfig
You need to update graphics.c and android_reboot.c (attached). I will upload the device tree a bit later, need to clean it up first.
Click to expand...
Click to collapse
Thanks, I'll merge this on my repos, if you want we can work together on cm10
Enviado desde mi GT-I8190 usando Tapatalk 2
It gives me No such file or directory
1.)You need to make a good procedure to the first post. this is chaos.
what do u mean by updating graphics.c..... replacing by new one? and the other file location?
2.) What do u mean by : be careful with the partition number (for example if you forget the number 2 you will end up rewriting your partition table, thus bricking your device).
Shapeshift said:
You need to make a good procedure to the first post. this is chaos.
what do u mean by updating graphics.c..... replacing by new one? and the other file location?
Click to expand...
Click to collapse
There's a board define to specify a different graphics.c Just using it and copying the correct graphics.c will work...
Enviado desde mi GT-I8190 usando Tapatalk 2
and android reboot.c where do i copy both files.
Never mind I did it. However I've got an Error mounting /sdcard!
Shapeshift said:
and android reboot.c where do i copy both files.
Click to expand...
Click to collapse
I'm gonna push to cm gerrit the workaround to keeep android_reboot.c inside device tree
Enviado desde mi GT-I8190 usando Tapatalk 2
OliverG96 said:
Thanks, I'll merge this on my repos, if you want we can work together on cm10
Click to expand...
Click to collapse
I'd be glad to work with you on this, especially considering that you already are a cm developer (I'm not really used to gerrit)
Can i honestly ask you to make a procedure? like steps or something. i am not good at cwm and things
I am asking you : how to update graphics.c and android reboot.c ? plz help asap
Shapeshift said:
Can i honestly ask you to make a procedure? like steps or something. i am not good at cwm and things
Click to expand...
Click to collapse
Sure. First you need to root your phone with the system.img method you'll find in other threads.
Next, uncompress and copy the recovery.img on your SD card, which is then to be inserted in the phone.
Then you enable must adb debugging in the system preferences, and with the Android SDK installed on your PC, run "adb shell". If it says adb: command not found you'll have to find where the adb binary is, and use the full path (such as, "C:\Program Files\android-sdk\platform-tools\adb.exe" but that's an example, you must find what the proper path is).
Next after having run "adb shell" you enter "su" to obtain root privileges (you will get a warning prompt. simply answer yes). Finally, run "dd if=/sdcard/recovery-clockwork-6.0.2.7-golden.img of=/dev/block/mmcblk0p21" to install CWM, and then you can reboot into CWM after exiting the shell (use the "exit" command twice) with the command "adb reboot recovery".
Now regarding the two C files I posted, it is a matter of copying them into your CM10 tree.
graphics.c goes into bootable/recovery/minui/ (however it is better to use the BoardConfig to setup a device-specific graphics.c)
android-boot.c goes into system/core/libcutils/
This will only get you so far, you'll need for instance Oliver's device tree to compile golden.
hm. i have already adb and i have specified path in windows for it. so i can run it everywhere. my device is rooted and i have only one more question for you. Do i need external sd? cant i put it onto internal sd?
Shapeshift said:
hm. i have already adb and i have specified path in windows for it. so i can run it everywhere. my device is rooted and i have only one more question for you. Do i need external sd? cant i put it onto internal sd?
Click to expand...
Click to collapse
Yes, sure. Or use /tmp/ to store it temporarily (the file will go away after the next boot)
So I just found out something really cool, the stock (prebuilt) j4fs.ko and param.ko modules can be loaded along a 3.0.31 kernel built from source, which means it will be possible to simply use them instead of this android_boot ugly hack.
ok i have installed cwm. but it cant mount sdcard. try to fix. nothing is mountable. cant mount sdcard as well as backup folder
Just posting here to say a big thank you to all of you devs!
:good:
PS: And a small (silly) question:
as i 'm not using a pre-rooted ROM. What if I made an ODIN flashable tar.md5 of the original *.img? Wouldnt it work?

Sailfish OS on X

Instructions:
https://jolla.com/sailfishxinstall/
Download:
http://images.devaamo.fi/sfe/suzu/
thanks to all the guys that worked on this port.
Kernel source:
https://github.com/mer-hybris/android_kernel_sony_msm
This make_ext4fs works for flashing on macOS
For some reason with this build the system-icons vanish for me after restarting the device once :/
I had much better results using this build.
Also by default (at least with the image I linked) only two of the 6 cpu-cores are enabled. To fix that one must add this under the init-section of the /init.loire.pwr.rc file and reboot (All credit for this go to abranson from the #sailfishos-porters irc).
Thanks for this port! are you planning to continue building for Xperia X or is a test build before official release?
Enviado desde mi F5121 mediante Tapatalk
keep going till then, also ive updated the above link
how flash it?
FuLiterary said:
how flash it?
Click to expand...
Click to collapse
read the first post
FuLiterary said:
how flash it?
Click to expand...
Click to collapse
make sure when you are flashing sailfish support only F5121 and does not support sdxc
Hello, friend! I am a Chinese user, I do not understand the tutorial, there is no mor
Jozinek said:
so only Linux or MacOS too?
Click to expand...
Click to collapse
Flashing works on macOS too. You just need to use the make_ext4fs I linked instead of the one linked on top.
janeliang34 said:
Hello, friend! I am a Chinese user, I do not understand the tutorial, there is no mor
Click to expand...
Click to collapse
extract the tar, open a terminal inside the extracted folder and run ./flash.sh
One question. Zip file with AOSP should be moved intact or only vendor folder from inside it?
Seems it has to be whole .zip.
Jozinek said:
i never make something like this in MacOS (i have Macbook Air, but also with Windows), can you write step by step how to make it. This is something totally new for me (i flashed hundreds of XPERIA smartphones, i have Emma tool, but never try this...)
Click to expand...
Click to collapse
Sure thing
First of all your bootloader needs to be unlocked. I'm assuming you already did that but if not you should read about backuping your drm-keys because otherwise they can't be recovered after unlocking your bootloader unless you do that.
If you don't have fastboot installed yet follow this guide.
After that download the first file linked at the top of this thread.
Unpack the archive (if you can't open it I recommend "the unarchiver" from the app-store).
Place both this file and the zip from the third link at the top in the unpacked folder (in the path where the flash.sh is). Don't unpack the .zip file!
After that open a terminal and navigate to your unpacked folder (if you don't know how to do that google for "terminal tutorial mac").
Run
Code:
chmod +x flash.sh
chmod +x make_ext4fs
to mark the flash-script and the make_ext4fs-file as executable.
Boot your device into fastboot mode (hold volume up while it's turned off and plug in your usb-cable) and finally run
Code:
./flash.sh
to install sailfishOS on the device.
If there is a "hybris-recovery.img" file in the directory (can't quite remember if that's the case with this build) also run
Code:
fastboot flash recovery hybris-recovery.img
to install a sailfishOS specific recovery.
After that you can reboot your device and enjoy Sailfish OS
@Jozinek
You didn't unpack the .tar.bz, inside are all files needed to flash. Than You have to move make_ext4fs, AOSP.zip and flash.fs into created (by unpacking) folder and start/cd Terminal there.
Jozinek said:
Edit3 - it worked now, it was bad make_ext4fs, thanks all of you
Click to expand...
Click to collapse
So that means you are doing a review on YouTube, right?
Friend, is there a tutorial for Windows installation? To be more detailed, this is my first contact
janeliang34 said:
Friend, is there a tutorial for Windows installation? To be more detailed, this is my first contact
Click to expand...
Click to collapse
Right now there is no windows support. The final build (which will be officially sold by Jolla) will make windows-installation possible.
If you know your way around cygwin you could probably get it to flash using windows (other than the flash.sh script there's nothing *nix-exclusive).
Is the rom stable enough for daily use ? and is Alien Dalvik available in this rom to run Android apps ?
no android dalvik or any software that needs license, this version is just community version like aosp without play store.
when flashing there's error make_ext4fs: no such file or directory, when i use the second one there's error: wrong exec format

Can't delete/modify system files.

Hello.
I've installed viper4android on my mido. Everything is ok, but there is a background static sound when music is being played. According to the viper FAQ I need to delete /system/lib/soundfx/libbundlewrapper.so. What did I do:
1. Mount system as rw
adb shell
su
mount -o rw,remount,rw /system
2. try to rename that file
cd /system/lib/soundfx
mv libbundlewrapper.so libbudnlewrapper-2.so.bak
3. No success. Trying to create backup in a file manager and than trying to delete it. Still no luck. Changed system to ro and I'll wait for suggestions.
The file is there like I haven't done anything. The uncharted territory of the system partition still awaits for me. What I can do next to get the thing to work?
Rust3dCor3 said:
Hello.
I've installed viper4android on my mido. Everything is ok, but there is a background static sound when music is being played. According to the viper FAQ I need to delete /system/lib/soundfx/libbundlewrapper.so. What did I do:
1. Mount system as rw
adb shell
su
mount -o rw,remount,rw /system
2. try to rename that file
cd /system/lib/soundfx
mv libbundlewrapper.so libbudnlewrapper-2.so.bak
3. No success. Trying to create backup in a file manager and than trying to delete it. Still no luck. Changed system to ro and I'll wait for suggestions.
The file is there like I haven't done anything. The uncharted territory of the system partition still awaits for me. What I can do next to get the thing to work?
Click to expand...
Click to collapse
What rom do you use? Miui or los/aosp? Also do you use, magisk or super su? Plus, please tell how did u Install viper, that is through recovery or by using magisk?.
MyNameIsRage said:
What rom do you use? Miui or los/aosp? Also do you use, magisk or super su? Plus, please tell how did u Install viper, that is through recovery or by using magisk?.
Click to expand...
Click to collapse
I use Official and final RR
The phone uses magisk and viper was flashed by magisk (should I remove the module and flash as non-system app?)
Rust3dCor3 said:
I use Official and final RR
The phone uses magisk and viper was flashed by magisk (should I remove the module and flash as non-system app?)
Click to expand...
Click to collapse
Why don't you use es file manager? I just tried i was able to do it with es.
MyNameIsRage said:
Why don't you use es file manager? I just tried i was able to do it with es.
Click to expand...
Click to collapse
Still does not work. I have no idea what to do. Again.
Renaming the file does not go despite a Toast is visible "Rename Successful" and while deleting there is "Device or resource busy"
Rust3dCor3 said:
Still does not work. I have no idea what to do. Again.
Renaming the file does not go despite a Toast is visible "Rename Successful" and while deleting there is "Device or resource busy"
Click to expand...
Click to collapse
Why don't you try deleting it from twrp.
MyNameIsRage said:
Why don't you try deleting it from twrp.
Click to expand...
Click to collapse
I tried. The funny part is that I can only see /system/usr. No other folder is in /system. Thats why I've posted this topic. I'm just lost.
Rust3dCor3 said:
I tried. The funny part is that I can only see /system/usr. No other folder is in /system. Thats why I've posted this topic. I'm just lost.
Click to expand...
Click to collapse
Nope, you haven't mounted system in twrp, that's the reason you are only seeing /usr
So do this
From main menu, select "mount" and there select System, also make sure that the "system" box is checked and the box saying "mount system partition as read only" is unchecked(I've attached a screenshot for reference). Now you can easily go to /system and it should list the files and folders., And you can delete the file you want. Quote me if you need more help
MyNameIsRage said:
Nope, you haven't mounted system in twrp, that's the reason you are only seeing /usr
So do this
From main menu, select "mount" and there select System, also make sure that the "system" box is checked and the box saying "mount system partition as read only" is unchecked(I've attached a screenshot for reference). Now you can easily go to /system and it should list the files and folders., And you can delete the file you want. Quote me if you need more help
Click to expand...
Click to collapse
I can't believe how stupid I am. Thank You for Your advice.

[GSI][AOSP][11] SYSTEM-ARM64-A/B - Redmi 9 - Dynamic System Partition

How to flash phh's system arm64-A/B GSI on the Redmi 9's (lancelot) dynamic system partition
All the development credits for this GSI go to @phhusson. For more information head over to his thread.
Bugs:
• Auto brightness (works with an overlay)
• Brightness slider
• Headphone jack
• Offline charging?
• VoLTE?
For bug fixes refer to Post #2 or search for reported bugs on Phh's treble experimentations issues tracker on GitHub.
What is working:
Everything else
WARNING:
Only proceed if you know what you are doing! Be aware of the risks associated to unlocking your bootloader. Ensure to have the MIUI Fastboot ROM downloaded to restore your device in case it soft bricks. All your data will be deleted during the process so a backup is essential. Charge your device to at least 50% before proceeding.
Requirements:
1) Unlocked bootloader here
2) Latest Android platform tools here
3) MIUI stock recovery (maintain it to be able to boot into userspace fastboot)
4) Xiaomi fastbootd drivers here
5) Phh-Treble GSI (Use a system-arm64-ab-gapps) here
6) vbmeta.img here
Steps:
Run the commands below within the platform-tools folder after enabling debugging in Developer settings on your phone.
1) adb devices (to authorize debugging)
2) adb reboot bootloader (to boot into fastboot mode)
3) fastboot reboot fastboot (to boot into userspace fastboot)
4) fastboot flash system system.img
5) fastboot -w
6) fastboot flash vbmeta vbmeta.img (use attached null vbmeta to disable avb)
7) fastboot reboot
Notes:
• First time boot takes 1 minute. phh's GSI has root by default however the logical system partition is read only. Any system mods should be done as Magisk modules systemlessly. A patched boot.img may cause bootlooping on Android 11 GSIs however Magisk now works fine even on R GSIs on MTK devices, thanks to @topjohnwu!
• System can be RW such as to push overlays. Thanks to the great phhusson!
• A better way to disable Android Verified Boot is by running below command using a stock vbmeta image file:
Code:
fastboot --disable-verification flash vbmeta vbmeta.img
Fixes:
I'll post fixes to bugs as suggested by users in this thread here.
• Brightness slider and headphone jack [Credit to @M47Z and @Shas45558] — Run code below in root ADB shell or any Terminal app on your phone:
Code:
su
setprop persist.sys.qcom-brightness $(cat /sys/class/leds/lcd-backlight/max_brightness)
setprop persist.sys.overlay.devinputjack true
reboot
• Note that CAOS by @eremitein has the above fixes integrated and is based on phhusson's AOSP.
How is the performance .any lag ?
Once you boot there are no lags. FYI my device is only 3 GB RAM. I just observed that booting is a little faster with the lighter Phh-Treble system installed as compared to Havoc. Maybe that's something for you to consider.
nielsync said:
Once you boot there are no lags. FYI my device is only 3 GB RAM. I just observed that booting is a little faster with the lighter Phh-Treble system installed as compared to Havoc. Maybe that's something for you to consider.
Click to expand...
Click to collapse
Is your headphones work??is brightness work?
Headphones not working but good enough BT audio works with speakers. Haven't tested in call audio on BT earphones though. Also not sure about USB-C audio output. Someone who has tested can share with us. Brightness is also broken.
I need testers
I built the overlay but I need testers to see if the overlay is working
Overlay link : github.com/mehdiFa-web/overlay
Mido2222 said:
I built the overlay but I need testers to see if the overlay is working
Overlay link : github.com/mehdiFa-web/overlay
Click to expand...
Click to collapse
Edit: Not working. Refer to post #18 for info.
Mido2222 said:
I built the overlay but I need testers to see if the overlay is working
Overlay link : github.com/mehdiFa-web/overlay
Click to expand...
Click to collapse
how did you pushed it into /vendor/overlay/ ?
I get the permission denied error everytime with adb and with any root file explorer on the phone too.
kW_ said:
how did you pushed it into /vendor/overlay/ ?
I get the permission denied error everytime with adb and with any root file explorer on the phone too.
Click to expand...
Click to collapse
I didn't test it I just build it . You should have root just copy it into your phone's /system/overlay/, and set permission to rw-r--r-- / 0644. If you can't then maybe we can't edit system partition . You can use root explorer.
Well. I can't change permissions and copy it. I have seen that other roms doesn't have read only on the system partition so i will try it later. Lineageos is one of these roms maybe.
Gsi will not boot with magisk_patch boot.img.....
So no root access......
How you push file into system or vendor??
Shas45558 said:
Gsi will not boot with magisk_patch boot.img.....
So no root access......
How you push file into system or vendor??
Click to expand...
Click to collapse
Phh-Treble has root so you are good to go. On the other hand without flashing a custom recovery I got root on Havoc-OS through flashing the patched boot image and even installed a module in Magisk manager without any issues. Its just that the way the system partition is mounted on these new phones released with Q makes it almost impossible to modify it. Let a genius surprise us.
nielsync said:
Phh-Treble has root so you are good to go. On the other hand without flashing a custom recovery I got root on Havoc-OS through flashing the patched boot image and even installed a module in Magisk manager without any issues. Its just that the way the system partition is mounted on these new phones released with Q makes it almost impossible to modify it. Let a genius surprise us.
Click to expand...
Click to collapse
In my case when I flash patch boot my gsi wili not boot....
What gsi are you use?? Give the link plz
@nielsync
So im a genius nd going to surprise you if anyone wants to modify system partition then custom recovery is must required e.g in Twrp mount /system , /vendor then go to file manager in twrp i forgot the name of tab in which you ll find the filemanager you can find it yourself lmao ,then select the file by finding in ur storage nd then copy and paste it in desired location and then after pasting go to path where you pasted it,Select it and give it 0644 permissions and restart ..Boom.( I think root is necessary because without root the changes revert )
Abdul [email protected] said:
@nielsync
So im a genius nd going to surprise you if anyone wants to modify system partition then custom recovery is must required e.g in Twrp mount /system , /vendor then go to file manager in twrp i forgot the name of tab in which you ll find the filemanager you can find it yourself lmao ,then select the file by finding in ur storage nd then copy and paste it in desired location and then after pasting go to path where you pasted it,Select it and give it 0644 permissions and restart ..Boom.( I think root is necessary because without root the changes revert )
Click to expand...
Click to collapse
File manager is in Advanced tab of TWRP. In theory and in devices released with the now old partition structure it was that simple. You have a right to claim anything Mr. Genius You seem to be ahead of even @Dees_Troy and his team over at TWRP despite this wonderful explanation!
Shas45558 said:
In my case when I flash patch boot my gsi wili not boot....
What gsi are you use?? Give the link plz
Click to expand...
Click to collapse
I've used both Phh-Treble and Havoc-OS and can confirm that Magisk works on both without any issues. My boot image was already patched on MIUI so I only installed the manager application each time after flashing the GSI. See screenshots of Magisk Manager on Phh-Treble below.
Mido2222 said:
I built the overlay but I need testers to see if the overlay is working
Overlay link : github.com/mehdiFa-web/overlay
Click to expand...
Click to collapse
no it does not work
i mount the gsi system file on linux via loop disk...
then i place your apk /system/overly/
but the brightness is not work...
you can mount raw img file on linux ......
first creat folder on root via this cmd..
sudo mkdir /mnt/system
mount system.img via this cmd
sudo mount system.img /mnt/system
now you can edit system.img via root permission via this cmd...
sudo nautilus
now a file manager pop up with root
go to /mnt/system
copy your file where you want...and unmount via this cmd...
sudo umount /mnt/system
Thanks @Shas45558 for confirming that, it's still difficult to mod the installed system on the phone itself. I tried and got a 'permission denied' error via terminal in a custom recovery.
nielsync said:
Thanks @Shas45558 for confirming that, it's still difficult to mod the installed system on the phone itself. I tried and got a 'permission denied' error via terminal in a custom recovery.
Click to expand...
Click to collapse
That's why I use pc with Linux and do the above things to puss the file inside system.img....

No more wifi nor bluetooth back on stock ROM - redmi go

Hello xda community,
Thanks for being here with so much to teach to everybody, and so useful guides and help !
I have got an old Xiaomi Redmi go (tiare) and flashed newer 10.2.25 global ROM through legacy recovery, and it worked well.
Then i tried Lineage OS unofficial versions, flashed through LOS recovery. There was another tool to flash called «retrofit dynamic partitions converter». The LOS ROM are OK, but quite slow. I wanted to go back to stock ROM.
I flashed again legacy recovery (though fastboot) then stock ROM through this legacy recovery. Unfortunately i ended with :
- a «succeeded» flash however a unusual «[t]» as final flashing status
- no wifi and no bluetooth. No MAC adress is to be seen in «device info». The other apps and features seem to work well.
- logical partition metadata has invalid geometry magic signature, when i try to check for partitions and table (with adb shell and fsck.2fs command).
+ if a flash again LOS ROM, wifi and bluetooth are working (and i can see the MACs adresses)
I am not sure if the 3 first points above are linked. I would like to get wifi and bluetooth working again. What should I try or check ?
Thanks for your help !
Hey, I also had the same problem. You need to flash persist.img
1. install any custom recovery
2. copy persist.img from stock rom to root of the internal storage
3. reboot to recovery
4. install adb on computer
5. run this command
adb shell simg2img /sdcard/persist.img /sdcard/persistProper.img
adb shell dd of=/dev/block/bootdevice/by-name/persist if=/sdcard/persistProper.img
if if is of, is of then if...
Thanks @fluentmoheshwar , I will try that !
And I will try not to confuse if and of as much as @CXZa
Rsstkln said:
And I will try not to confuse if and of as much as @CXZa
Click to expand...
Click to collapse
dd of=/dev/block/bootdevice/by-name/persist if=/sdcard/persist.img
Thanks ! if=input file, of=output file, that should be OK !
May I ask something more ? I would like to know whether I have to use simg2img command to get a proper «.img» file before the «dd» command, in the case I take the persist.img file from a stock ROM.
Rsstkln said:
Thanks ! if=input file, of=output file, that should be OK !
May I ask something more ? I would like to know whether I have to use simg2img command to get a proper «.img» file before the «dd» command, in the case I take the persist.img file from a stock ROM.
Click to expand...
Click to collapse
Yep.
Rsstkln said:
Thanks ! if=input file, of=output file, that should be OK !
May I ask something more ? I would like to know whether I have to use simg2img command to get a proper «.img» file before the «dd» command, in the case I take the persist.img file from a stock ROM.
Click to expand...
Click to collapse
oh I messed up! you need to use simg2img

Categories

Resources