Hello everyone,
I have recently been messing around with my droid 2 and was able to change the boot screen successfully by doing the following commands:
PHP:
adb push bootanimation.zip system/media/
After running this command I had the new animation and that works great. My question is if anyone know how to incorporate a boot up sound with this. I have tried creating a bootscreen folder and having the boot_animation.xml in both the system/media path and the system/media/bootscreen path, however to no success. It is to be noted that when I removed the bootanimation.zip from the system/media folder, it defaults to the original blue android loading animation as if it were not seeing a bootscreen folder.
theecho said:
Hello everyone,
I have recently been messing around with my droid 2 and was able to change the boot screen successfully by doing the following commands:
PHP:
adb push bootanimation.zip system/media/
After running this command I had the new animation and that works great. My question is if anyone know how to incorporate a boot up sound with this. I have tried creating a bootscreen folder and having the boot_animation.xml in both the system/media path and the system/media/bootscreen path, however to no success. It is to be noted that when I removed the bootanimation.zip from the system/media folder, it defaults to the original blue android loading animation as if it were not seeing a bootscreen folder.
Click to expand...
Click to collapse
What is the boot animation that you used and is is just as simple as removing the boot animation that is in the system media file and replacing it with another boot animation like what was done with the D1?
Yes it was pretty simple just do the following
PHP:
adb pull system/media/bootanimation.zip
This will pull you current boot animation. Move it somewhere to keep as a backup.
PHP:
adb push bootanimation.zip system/media/
This is assuming bootanimation.zip is located in you android sdk's tools folder. You can use any of the bootanimations that are an assortment of pngs.
Sent from my DROID2 using XDA App
I wonder what would happen if you had one in data/local
bump*
Anyone have any further info on this? I would really like a startup sound again.
theecho said:
Yes it was pretty simple just do the following
PHP:
adb pull system/media/bootanimation.zip
This will pull you current boot animation. Move it somewhere to keep as a backup.
PHP:
adb push bootanimation.zip system/media/
This is assuming bootanimation.zip is located in you android sdk's tools folder. You can use any of the bootanimations that are an assortment of pngs.
Sent from my DROID2 using XDA App
Click to expand...
Click to collapse
Ok if the boot animation is on the system media file like the D1 why cant we just take a boot animation and delete it out of the system media and replace it with a new one? Do you have to ADB push it?
The boot animation is kept in the system/media folder. If you can replace this by another means, it will work. I chose to use adb push as I was already in my command line due to an application i was writing.
help
hey guys, sorry for the noob question, but what r u guys using to zip your finnished product? (not a flashable zip) just the zip u can push or use root expor to just place in correct spot. i know you cant use anycompression, but ive tryed everything and i must be doing something wrong. to make sure my zip methods are not adding any compression, i pulled my orig bootanimation, which zipped is 6114kb, i unzipped, then rezipped, and i keep getting dif sized zip files.. if done right it should be the exact same size right?
using the following this is what i get
ok oring is 6114kb, heres what the others do, 7zip 6124kb(bigger) PC zip client 6086kb and winrar is the closest at 6119kb
any advice would be greatly apr
Does doing ADB push require you to plug the phone into the computer in PC mode?
Also, can you change boot animations on stock ROM, or only on custom ROM?
I downloaded a bootanimation.zip file that's 480x854 pixels, the same as the D2's screen. I also looked at the default bootanimation.zip file, which is 480x480. Does the resolution matter at all, or can the phone display it either way?
Tappin' and Talkin' with Tapatalk
theecho said:
Yes it was pretty simple just do the following
PHP:
adb pull system/media/bootanimation.zip
This will pull you current boot animation. Move it somewhere to keep as a backup.
PHP:
adb push bootanimation.zip system/media/
This is assuming bootanimation.zip is located in you android sdk's tools folder. You can use any of the bootanimations that are an assortment of pngs.
Sent from my DROID2 using XDA App
Click to expand...
Click to collapse
No need, you can download Super Manager from Market, using file manager function and get root access to copy directly.
Have fun.
Since this is bumped anyway, for whatever reason sounds will not work on boot with the default Rom. MIUI and other Roms are necessary for this mod.
Hi all,
i often noticed people(including me) who tried to modificate their framework-res.apk resulting in boot loops(e.g. looping at white/green quietly brilliant screen).
So i tried to find out a fast way to get back to my(original) framework-res.apk without usage of recovery console each time my framwork-res.apk did not work as expected.
How it could help you:
It's a fast way to:
check out your moddings when doing numerous modifications in different versions of your modded framework-res.apk on your way to get it to work.
if you want to get back to your original/working framework-res.apk, even when it boot loops!
Click to expand...
Click to collapse
When you do numerous modifications on framework-res.apk and your modded apk leads to a boot loop you will be able to replace the current apk through e.g. the original apk.
At this boot point(boot loop screen) Android nearly finished booting and you have access on ADB commands.
What do you need to do this:
Download and extract/install QtADB from the link below:
QtADB
to replace the erroneous(current) framework-res.apk by the original or a fixed one.
Click to expand...
Click to collapse
There's no need to describe how to get a copy of your untouched framework-res.apk from device, since there are numerous tutorials around here.
Please check this tutorials to get a copy of your apk.
Please note before beating your device:
this probably will work with the most visual moddings of framework-res.apk - but i can't guarantee it works 100%.
It probably will not work when you play around with hardware or connections setting, other apk's or other stuff in other folders, so i am not responsible if it does not work.
always backup your current ROM/settings/whatever and save a copy of your untouched framework-res.apk
There is a little catch in it in comparsion with using recovery:
After you did like described, you have to set your background image and your (google) accounts anew.
But this is just a little work and it's not necessary until your framework-res.apk is doing the modded stuff correctly - or if you want to set the original framework-res.apk back.
Click to expand...
Click to collapse
So let's start to revive your original framework-res.apk.
(Of course you can use this method to push a modded to your device, to check out if your modding works):
Boot your device and let it load until you're at boot loop
(Download, extract,) run QtADB
Navigate in left window(Computer) to your copy of original framework-res.apk(e.g. in root directory of SD card, but i recommend a folder on your computer)
Navigate in right window(Phone) to device folder /system/framework/
Use in left window(Computer) context menu on your original framework-res.apk and select copy or drag&drop it to right window to copy the original framework-res.apk to your device
(just ignore that your device is doing strange stuff then, since it cannot access your framework-res.apk correctly at this point)
Then enter shell of QtADB(at left toolbar of QtADB) and enter the following commands to set the apk's prermissions:su
cd /system/framework/
chmod 777 framework-res.apk
Reboot your device( e.g. by using top menu->tools-ADB->reboot)
Set your background image and your (google/HtcSense) accounts anew.
Hope it helps you a bit on modding,
Greetings, brush2(Stephan)
error
hey man, Im getting an error on this. I changed my transitions effects ( folder anim on framework-res.apk) using the app metamorph. well, now every time I open an app the phone ( xt920) reboot. I ask my friend that have the same phone to send me his framework-res.apk. I try to replace using this method but dont got. I draged and droped the new apk and when I would type the shell's code the last code dont work because it said that the file is a "read-only system". What can I do to have my phone back? Please help.
Thanks.
Hello,
I have been trying to make my Samsung Galaxy Note 3 with Lineage OS boot automatically when the charger is connected instead of booting to the battery charging screen.
Since its a Samsung phone it doesn't have fastboot... it has ODIN instead. So using fastboot no-charge oem cant be done. from what i have googled.
I have also tried locating a file called "lpm" in /system/bin but lineage OS doesn't have that file, since i think its Samsung specific.
Lastly i tried adding the lpm service, and modifying the boot.img > init.rc to add the service to the "on charge" event. I found that the Samsung official ROM has a service configured like this:
Code:
service lpm /system/bin/lpm
class charger
critical
so i copy pasted this into the init.rc file of lineage OS and then created the file "lpm" under /system/bin and edit it to this:
Code:
#!/system/bin/sh
/system/bin/reboot
This didn't work, and i cant find a way to see if the file is being executed at all.
My question is, does anyone know how to make lineage OS boot automatically, from being powered off, instead of going to the battery charging boot screen?
Thanks Oliver
oliver92 said:
Hello,
I have been trying to make my Samsung Galaxy Note 3 with Lineage OS boot automatically when the charger is connected instead of booting to the battery charging screen.
Since its a Samsung phone it doesn't have fastboot... it has ODIN instead. So using fastboot no-charge oem cant be done. from what i have googled.
I have also tried locating a file called "lpm" in /system/bin but lineage OS doesn't have that file, since i think its Samsung specific.
Lastly i tried adding the lpm service, and modifying the boot.img > init.rc to add the service to the "on charge" event. I found that the Samsung official ROM has a service configured like this:
Code:
service lpm /system/bin/lpm
class charger
critical
so i copy pasted this into the init.rc file of lineage OS and then created the file "lpm" under /system/bin and edit it to this:
Code:
#!/system/bin/sh
/system/bin/reboot
This didn't work, and i cant find a way to see if the file is being executed at all.
My question is, does anyone know how to make lineage OS boot automatically, from being powered off, instead of going to the battery charging boot screen?
Thanks Oliver
Click to expand...
Click to collapse
Hi,
did you ever get this to work? I'm trying to do the same on a huawei pra-lx1 ...
tiagofalves said:
Hi,
did you ever get this to work? I'm trying to do the same on a huawei pra-lx1 ...
Click to expand...
Click to collapse
You guys solved this? I've been trying to figure this out too.
If you go to system folder, then bin folder, there is a file sysinit. Inside it reads:
#! /system/bin/sh
export PATH=/sbin: /system/sbin: /system/bin: /system/xbin
for i in /system/etc/init.d/*; do
if [ -x $i ]; then
/system/bin/log -t sysinit Running $i
fi
done
Do you think this is about booting?
guys is this still open?
I would like to make my i9300 auto boot the same way. cant find the lpm file.
thank you
For whom it may concern, a way to autoboot a device on lineage is to edit the init.rc file in boot.img. I tried this on a motorola motoG 4g. In /init.rc there is a section titled charger. While on charger, you have to add class stop charger trigger late init.
# Healthd can trigger a full boot from charger mode by signaling this
# property when the power button is held.
on property:sys.boot_from_charger_mode=1
class_stop charger
trigger late-init
on charger
class_start charger
++ class_stop charger
++ trigger late-init
The same init.rc I found on Samsaung Galaxy S2 with lines 14.1, so there is a chance here as well.
Experience sharing
Peenoyako said:
You guys solved this? I've been trying to figure this out too.
Click to expand...
Click to collapse
Almost no other methods were successful on MIUI 10 Redmi Note 4x (Snapdragon) , which is already bootloader unlocked, rooted condition.
However after updation of
(1) existing TWRP_3.2.1-5_mido was updated with [Mido][Material][Twrp-Treble][3.2.1-10].zip to facilitate wiping
(ii) Total wipe was carried out from above latest twrp (wipe>Advance wipe>selected all like Delvik / ART Cache, System, Vendor, Data, Internal Storage and Cache>swiped to wipe
(now only 2 things left on phone fastboot and recovery
(iii) Installed lineage 15.1 (mido_lineage-15.1-20180807-nightly-mido-signed.zip) and gapps (mido_open_gapps-arm64-8.1-nano-20180812.zip)
rebooted and initial steps of phone setup was completed
Rebooted to TWRP and installed addonsu-15.1-arm64-signed.zip to root it. It may be noted for this type , root to be enabled at developer options.
(iv)LOS Boot image was extracted through TWRP (Backup> select boot > swiped to Backup , it backed up the boot file at TWRP folder on external SD card. The name of file is boot.emmc.win (64MB)
(v) I have renamed the file to boot and type to img (boot.img)
(vi) i have extracted the contents of the above boot.img with the help of Android.Image.Kitchen.v3.4-Win32 [we have to copy the above boot.img (it should should have word boot in the name and img type to be get recognized by the program ) to Android.Image.Kitchen.v3.4-Win32 folder ] on windows 10 pro 64bit
(vii) i have modified the init.rc at "on chrager" , after modification (including existing+added looks like below)
on charger
class_start charger
class_stop charger
trigger late-init
(viii) repacked it with the same windows program Android.Image.Kitchen.v3.4-Win32 , it will be repacked in the same directory with a name" image-new.img "
(xi) Transferred it to the phone and installed it with TWRP (install>install image> select above "image-new.img" >select boot > swiped to install
Now the phone is booting automatically, if charger is connected (success).
But further work is needed to address important / critical situation like the phone is switched off while use (e.g. while talking on phone with some one while walking little away from office or home or excessive use due excessive follow ups, we will keep it on charging but there is some possibility to forget for considerable amount of time. To avoid this, if the phone is boot up in auto after some 2 or 3 % of charge (like iphones) it will be great. Further if some body wants shutdown and charge it (or it can be kept in silence also), simply charger may be connected before shutdown and it should not wake up in auto.
Most of the credit goes to many netgens , it is only the experience sharing without any responsibility since if not understood properly , if not done planned way, carefully, accurately relevant to phone make , model , model no , sub no , sub spec as applicable , within no time data loss and / or phone bricking may happen.
Another Experience sharing with Redmi Note 4 ( 4x )Snapdragon Auto Boot on Charger
knreddy said:
Almost no other methods were successful on MIUI 10 Redmi Note 4x (Snapdragon) , which is already bootloader unlocked, rooted condition.
However after updation of
(1) existing TWRP_3.2.1-5_mido was updated with [Mido][Material][Twrp-Treble][3.2.1-10].zip to facilitate wiping
(ii) Total wipe was carried out from above latest twrp (wipe>Advance wipe>selected all like Delvik / ART Cache, System, Vendor, Data, Internal Storage and Cache>swiped to wipe
(now only 2 things left on phone fastboot and recovery
(iii) Installed lineage 15.1 (mido_lineage-15.1-20180807-nightly-mido-signed.zip) and gapps (mido_open_gapps-arm64-8.1-nano-20180812.zip)
rebooted and initial steps of phone setup was completed
Rebooted to TWRP and installed addonsu-15.1-arm64-signed.zip to root it. It may be noted for this type , root to be enabled at developer options.
(iv)LOS Boot image was extracted through TWRP (Backup> select boot > swiped to Backup , it backed up the boot file at TWRP folder on external SD card. The name of file is boot.emmc.win (64MB)
(v) I have renamed the file to boot and type to img (boot.img)
(vi) i have extracted the contents of the above boot.img with the help of Android.Image.Kitchen.v3.4-Win32 [we have to copy the above boot.img (it should should have word boot in the name and img type to be get recognized by the program ) to Android.Image.Kitchen.v3.4-Win32 folder ] on windows 10 pro 64bit
(vii) i have modified the init.rc at "on chrager" , after modification (including existing+added looks like below)
on charger
class_start charger
class_stop charger
trigger late-init
(viii) repacked it with the same windows program Android.Image.Kitchen.v3.4-Win32 , it will be repacked in the same directory with a name" image-new.img "
(xi) Transferred it to the phone and installed it with TWRP (install>install image> select above "image-new.img" >select boot > swiped to install
Now the phone is booting automatically, if charger is connected (success).
But further work is needed to address important / critical situation like the phone is switched off while use (e.g. while talking on phone with some one while walking little away from office or home or excessive use due excessive follow ups, we will keep it on charging but there is some possibility to forget for considerable amount of time. To avoid this, if the phone is boot up in auto after some 2 or 3 % of charge (like iphones) it will be great. Further if some body wants shutdown and charge it (or it can be kept in silence also), simply charger may be connected before shutdown and it should not wake up in auto.
Most of the credit goes to many netgens , it is only the experience sharing without any responsibility since if not understood properly , if not done planned way, carefully, accurately relevant to phone make , model , model no , sub no , sub spec as applicable , within no time data loss and / or phone bricking may happen.
Click to expand...
Click to collapse
The above procedure is successful on the following ROM (similar to LOS15.1 , used magisk 16.7 or higher for rooting)
xiaomi.eu_multi_HMNote4X_8.12.20_v10-7.0.zip
downloaded from
https://excellmedia.dl.sourceforge..../xiaomi.eu_multi_HMNote4X_8.12.20_v10-7.0.zip
knreddy said:
Almost no other methods were successful on MIUI 10 Redmi Note 4x (Snapdragon) , which is already bootloader unlocked, rooted condition.
However after updation of
(1) existing TWRP_3.2.1-5_mido was updated with [Mido][Material][Twrp-Treble][3.2.1-10].zip to facilitate wiping
(ii) Total wipe was carried out from above latest twrp (wipe>Advance wipe>selected all like Delvik / ART Cache, System, Vendor, Data, Internal Storage and Cache>swiped to wipe
(now only 2 things left on phone fastboot and recovery
(iii) Installed lineage 15.1 (mido_lineage-15.1-20180807-nightly-mido-signed.zip) and gapps (mido_open_gapps-arm64-8.1-nano-20180812.zip)
rebooted and initial steps of phone setup was completed
Rebooted to TWRP and installed addonsu-15.1-arm64-signed.zip to root it. It may be noted for this type , root to be enabled at developer options.
(iv)LOS Boot image was extracted through TWRP (Backup> select boot > swiped to Backup , it backed up the boot file at TWRP folder on external SD card. The name of file is boot.emmc.win (64MB)
(v) I have renamed the file to boot and type to img (boot.img)
(vi) i have extracted the contents of the above boot.img with the help of Android.Image.Kitchen.v3.4-Win32 [we have to copy the above boot.img (it should should have word boot in the name and img type to be get recognized by the program ) to Android.Image.Kitchen.v3.4-Win32 folder ] on windows 10 pro 64bit
(vii) i have modified the init.rc at "on chrager" , after modification (including existing+added looks like below)
on charger
class_start charger
class_stop charger
trigger late-init
(viii) repacked it with the same windows program Android.Image.Kitchen.v3.4-Win32 , it will be repacked in the same directory with a name" image-new.img "
(xi) Transferred it to the phone and installed it with TWRP (install>install image> select above "image-new.img" >select boot > swiped to install
Now the phone is booting automatically, if charger is connected (success).
But further work is needed to address important / critical situation like the phone is switched off while use (e.g. while talking on phone with some one while walking little away from office or home or excessive use due excessive follow ups, we will keep it on charging but there is some possibility to forget for considerable amount of time. To avoid this, if the phone is boot up in auto after some 2 or 3 % of charge (like iphones) it will be great. Further if some body wants shutdown and charge it (or it can be kept in silence also), simply charger may be connected before shutdown and it should not wake up in auto.
Most of the credit goes to many netgens , it is only the experience sharing without any responsibility since if not understood properly , if not done planned way, carefully, accurately relevant to phone make , model , model no , sub no , sub spec as applicable , within no time data loss and / or phone bricking may happen.
Click to expand...
Click to collapse
Thanks for this but my nose bled from reading this. I'm not really good in programming stuff. Hopefully you or somebody could post a video in youtube for the step by step process. I might understand this with visual instructions. If this does work then you've done a great job finding a solution for this.
I tried editing init.rc and another method below, both do turn on with usb power, but get stuck in the boot animation. It seems it doesn't complete loading. Unplugged the power, and reboot the tablet, and it will turn on normal and get past the boot screen.
The other method I tried, we know "on charge" loads up /sbin/charger. So I changed that file with
Code:
#!/system/bin/sh
#Skip offline charge and start device if enough juice on battery. If low on battery do offline charge
CAPACITY=$(cat /sys/class/power_supply/battery/capacity)
MIN_CAPACITY=15
echo $CAPACITY
if [ $((CAPACITY)) -gt $MIN_CAPACITY ]
then
/system/bin/reboot
fi
/system/sbin/charger_orig
Same thing. Boots up on usb power, but gets stuck in the lineage boot animation.
OK so I got it to work.
1. Extracted Boot image through TWRP (Backup> select boot > swiped to Backup)
2. Rename boot.emmc.win to boot.img
3. Copy boot.img to the root dir of the program Android.Image.Kitchen, and run "unpackimg.bat"
4. Open up folder /ramdisk/sbin/ and rename "charger" to "charger_orig"
4. Create "charger" and put in
Code:
#!/system/bin/sh
#Skip offline charge and start device if enough juice on battery. If low on battery do offline charge
CAPACITY=$(cat /sys/class/power_supply/battery/capacity)
MIN_CAPACITY=5
if [ $CAPACITY -gt $MIN_CAPACITY ]
then
sleep 1
/system/bin/reboot
fi
/sbin/charger_orig
4. Go back to the root of Android.Image.Kitchen and run "repackimg.bat"
5. Take "image-new.img" and copy to phone
5. Install img with TWRP (install>install image> select above "image-new.img" >select boot > swiped to install)
MolsonB said:
OK so I got it to work.
1. Extracted Boot image through TWRP (Backup> select boot > swiped to Backup)
2. Rename boot.emmc.win to boot.img
3. Copy boot.img to the root dir of the program Android.Image.Kitchen, and run "unpackimg.bat"
4. Open up folder /ramdisk/sbin/ and rename "charger" to "charger_orig"
4. Create "charger" and put in
Code:
#!/system/bin/sh
#Skip offline charge and start device if enough juice on battery. If low on battery do offline charge
CAPACITY=$(cat /sys/class/power_supply/battery/capacity)
MIN_CAPACITY=5
if [ $CAPACITY -gt $MIN_CAPACITY ]
then
sleep 1
/system/bin/reboot
fi
/sbin/charger_orig
4. Go back to the root of Android.Image.Kitchen and run "repackimg.bat"
5. Take "image-new.img" and copy to phone
5. Install img with TWRP (install>install image> select above "image-new.img" >select boot > swiped to install)
Click to expand...
Click to collapse
Hey,
I tried to open charger file on Windows 10 (with SublimeText & Notepad++) but always get weird characters.. So I have a fear that when I create the new charger file it won't work, as it is not encoded the same.. Maybe you can attach the new charger file..? Thanks you very much..
Caught in bootloop, is rooting mandatory?
knreddy said:
Almost no other methods were successful on MIUI 10 Redmi Note 4x (Snapdragon) , which is already bootloader unlocked, rooted condition.
However after updation of
(1) existing TWRP_3.2.1-5_mido was updated with [Mido][Material][Twrp-Treble][3.2.1-10].zip to facilitate wiping
(ii) Total wipe was carried out from above latest twrp (wipe>Advance wipe>selected all like Delvik / ART Cache, System, Vendor, Data, Internal Storage and Cache>swiped to wipe
(now only 2 things left on phone fastboot and recovery
(iii) Installed lineage 15.1 (mido_lineage-15.1-20180807-nightly-mido-signed.zip) and gapps (mido_open_gapps-arm64-8.1-nano-20180812.zip)
rebooted and initial steps of phone setup was completed
Rebooted to TWRP and installed addonsu-15.1-arm64-signed.zip to root it. It may be noted for this type , root to be enabled at developer options.
(iv)LOS Boot image was extracted through TWRP (Backup> select boot > swiped to Backup , it backed up the boot file at TWRP folder on external SD card. The name of file is boot.emmc.win (64MB)
(v) I have renamed the file to boot and type to img (boot.img)
(vi) i have extracted the contents of the above boot.img with the help of Android.Image.Kitchen.v3.4-Win32 [we have to copy the above boot.img (it should should have word boot in the name and img type to be get recognized by the program ) to Android.Image.Kitchen.v3.4-Win32 folder ] on windows 10 pro 64bit
(vii) i have modified the init.rc at "on chrager" , after modification (including existing+added looks like below)
on charger
class_start charger
class_stop charger
trigger late-init
(viii) repacked it with the same windows program Android.Image.Kitchen.v3.4-Win32 , it will be repacked in the same directory with a name" image-new.img "
(xi) Transferred it to the phone and installed it with TWRP (install>install image> select above "image-new.img" >select boot > swiped to install
Now the phone is booting automatically, if charger is connected (success).
But further work is needed to address important / critical situation like the phone is switched off while use (e.g. while talking on phone with some one while walking little away from office or home or excessive use due excessive follow ups, we will keep it on charging but there is some possibility to forget for considerable amount of time. To avoid this, if the phone is boot up in auto after some 2 or 3 % of charge (like iphones) it will be great. Further if some body wants shutdown and charge it (or it can be kept in silence also), simply charger may be connected before shutdown and it should not wake up in auto.
Most of the credit goes to many netgens , it is only the experience sharing without any responsibility since if not understood properly , if not done planned way, carefully, accurately relevant to phone make , model , model no , sub no , sub spec as applicable , within no time data loss and / or phone bricking may happen.
Click to expand...
Click to collapse
Hey man, I've done everything you said except rooting part. System now stuck at bootloader. Why is rooting needed here? Do you think rooting will fix the issue?
Update: Successful, with another method!! Copied reboot file from system/bin to and paste to /ramdisk/sbin/ and rename "charger". Remove or rename the original charger file. Device will boot and then reboot to normal!
xxxwatari said:
Hey man, I've done everything you said except rooting part. System now stuck at bootloader. Why is rooting needed here? Do you think rooting will fix the issue?
Update: Successful, with another method!! Copied reboot file from system/bin to and paste to /ramdisk/sbin/ and rename "charger". Remove or rename the original charger file. Device will boot and then reboot to normal!
Click to expand...
Click to collapse
what file you copy? reboot? and you paste reboot into ramdisk/sbin? rename charger to charger_old? rename reboot to charger?
is it right?
ahhl said:
what file you copy? reboot? and you paste reboot into ramdisk/sbin? rename charger to charger_old? rename reboot to charger?
is it right?
Click to expand...
Click to collapse
Yes, there is a file named `reboot` in system/bin to and paste to /ramdisk/sbin/ where you can see `charger` file. You can rename the original `charger` file to anything or even delete it. Rename `reboot` to `charger` so when you plug in, the device triggers reboot instead of charging display. But it takes much longer for boot to complete this way
My boot.emmc.win file is empty after unpacking? any tips.
MolsonB said:
OK so I got it to work.
1. Extracted Boot image through TWRP (Backup> select boot > swiped to Backup)
2. Rename boot.emmc.win to boot.img
3. Copy boot.img to the root dir of the program Android.Image.Kitchen, and run "unpackimg.bat"
4. Open up folder /ramdisk/sbin/ and rename "charger" to "charger_orig"
4. Create "charger" and put in
Code:
#!/system/bin/sh
#Skip offline charge and start device if enough juice on battery. If low on battery do offline charge
CAPACITY=$(cat /sys/class/power_supply/battery/capacity)
MIN_CAPACITY=5
if [ $CAPACITY -gt $MIN_CAPACITY ]
then
sleep 1
/system/bin/reboot
fi
/sbin/charger_orig
4. Go back to the root of Android.Image.Kitchen and run "repackimg.bat"
5. Take "image-new.img" and copy to phone
5. Install img with TWRP (install>install image> select above "image-new.img" >select boot > swiped to install)
Click to expand...
Click to collapse
Did you used Magisk for this to root your device?
Auto shutdown of phone on disconnection of charger plug ( for Car) etc
knreddy said:
The above procedure is successful on the following ROM (similar to LOS15.1 , used magisk 16.7 or higher for rooting)
xiaomi.eu_multi_HMNote4X_8.12.20_v10-7.0.zip
downloaded from
https://excellmedia.dl.sourceforge..../xiaomi.eu_multi_HMNote4X_8.12.20_v10-7.0.zip
Click to expand...
Click to collapse
https://forum.xda-developers.com/android/apps-games/app-automate-t2870633/post80126909#post80126909
MolsonB said:
OK so I got it to work.
1. Extracted Boot image through TWRP (Backup> select boot > swiped to Backup)
2. Rename boot.emmc.win to boot.img
3. Copy boot.img to the root dir of the program Android.Image.Kitchen, and run "unpackimg.bat"
4. Open up folder /ramdisk/sbin/ and rename "charger" to "charger_orig"
4. Create "charger" and put in
Code:
#!/system/bin/sh
#Skip offline charge and start device if enough juice on battery. If low on battery do offline charge
CAPACITY=$(cat /sys/class/power_supply/battery/capacity)
MIN_CAPACITY=5
if [ $CAPACITY -gt $MIN_CAPACITY ]
then
sleep 1
/system/bin/reboot
fi
/sbin/charger_orig
4. Go back to the root of Android.Image.Kitchen and run "repackimg.bat"
5. Take "image-new.img" and copy to phone
5. Install img with TWRP (install>install image> select above "image-new.img" >select boot > swiped to install)
Click to expand...
Click to collapse
Doesn't seem to work on pie.. Or maybe im missing some things
jprimero15 said:
Doesn't seem to work on pie.. Or maybe im missing some things
Click to expand...
Click to collapse
Maybe the tool you're using is older than Pie?