[Completed] [HELP]Porting AOSP KK Zopo ZP999 to MX4 - XDA Assist

Hi,
i have a big problem with my first porting (an Aosp rom from zopo zp999 on my Meizu MX4). Stuck in bootanimation, only one times come the "Installing Applications". Any suggestions? libs modify? :crying:

Naphtha said:
Hi,
i have a big problem with my first porting (an Aosp rom from zopo zp999 on my Meizu MX4). Stuck in bootanimation, only one times come the "Installing Applications". Any suggestions? libs modify? :crying:
Click to expand...
Click to collapse
Hello,
As a senior member, you probably know that logcat is your friend. Since you may not have found how to simplify adb access for 4.4 builds, temporarily add this to your device tree (in the <your chipset name>.mk):
Code:
# Since Android 4.2.2, USB debugging requires authentication, something that is not possible during boot.
# To disable this, set the following property in default.prop (inside initrd):
# ro.adb.secure=0
# To get root access this is a must:
# ro.secure=0
# will allow you to run adbd as root via the adb root command:
#ro.debuggable=1
#service.adb.root=1
ADDITIONAL_DEFAULT_PROPERTIES += \
ro.secure=0 \
ro.adb.secure=0 \
ro.debuggable=1 \
service.adb.root=1 \
persist.service.adb.enable=1 \
persist.service.debuggable=1
Build that, flash, and then take a logcat while booting. You should be able to see what;s going on (even if you need another set of eyes...even then this thread is good for that).
Hope this helps, and good luck!

Thanks so much!
Inviato dal mio MX4 utilizzando Tapatalk

Related

[MOD][HOW TO][Update: 05-Aug-2011] 2nd-init port for Milestone2

Credit for koush for Droid2 Bootstrap
Credit for edgardcastro for sharing lots of information about 2nd-boot on Milestone1
Credit for Skrilax_CZ for 2nd-init and sh hijack
If you just want to install 2nd-init on your phone you can skip the whole guide and flash update-2nd-init.zip into your phone. As usual I will not hold responsibility to any damages it may cause.
WARNING: Use this ONLY if you know exactly what you are doing. This guide will make major changes in the /system partition and may turn the phone inoperative. I won’t hold responsibility if you brick your phone or to any damages it may cause.
Pre-requisites: A computer with Android SDK and ADB drivers installed and working. It’s recommended to have RSD Lite 4.9 and the appropriate SBF image just in case anything goes wrong.
This guide was made using a Brazilian Motorola Milestone2 based on Brazil Retail SBF and a computer running Windows Vista 32-bits. I started it from the scratch by flashing my phone with RSD Lite 4.9 and performing a full data/cache wipe, just to make sure any changes were discarded.
Note: Commands that should be entered in command prompt will be listed as: “C:\> <command>”. Commands issued to ADB Shell will be listed as: “# <command>”.
1. Enable USB Debugging on your phone;
2. Get permanent root. I used the app z4root which can be found here on XDA;
3. Install Droid2 Bootstrap. It may be downloaded from Market to support the developer. More info here http://www.koushikdutta.com/2010/08/droid-x-recovery.html;
4. Open Droid2 Bootstrap and click “Bootstrap Recovery”;
5. Use bootstrap to reboot into Clockwork Recovery and backup your phone;
6. Reboot;
7. C:\> adb remount
8. # stop
9. # mkdir /system/etc/rootfs
10. # cp /*.rc /system/etc/rootfs
11. # mkdir /system/etc/init.d
12. # cp /system/bin/sh /system/bin/_sh
13. # cp /init_prep_keypad.sh /system/bin
14. C:\> adb push sh_hijack.sh /system/bin/
15. C:\> adb push 2nd-init /system/bin/
16. C:\> adb push sysinit /system/bin/
WARNING: at this point you should keep a terminal window (adb shell) opened before replacing the 'sh' binary. This is so because you wont be able to open a new abd shell window to run the chmod command.
17. C:\> adb push sh /system/bin/
18. # chmod 755 /system/bin/sh
19. # chmod 755 /system/bin/sh_hijack.sh
20. # chmod 755 /system/bin/2nd-init
21. # chmod 755 /system/bin/sysinit
22. # ln -s /system/bin/busybox /system/xbin/mount
23. # ln -s /system/bin/busybox /system/xbin/rmdir
24. # ln -s /system/bin/busybox /system/xbin/cp
25. # ln -s /system/bin/busybox /system/xbin/umount
26. # ln -s /system/bin/busybox /system/xbin/run-parts
27. # reboot
28. At this point you should be getting into Clockwork Recovery every time, no matter how many times you have rebooted or if you’ve taken the battery of or not. THIS IS NORMAL. It means that the 2nd-boot + sh hijack is working as it should. The boots into clock recovery are caused by a conflict between sh hijack and logwrapper hijack (used by Droid2 Bootstrap). Continue the guide to fix this issue.
29. In clock recovery menu go to: mounts and storage>mount /system;
30. Open ADB Shell again (it will be available in clockwork recovery as well);
31. # cp /system/bin/logwrapper.bin /system/bin/mylogwrapper
32. C:\> adb pull /system/etc/rootfs/
33. Open init.rc and init.mapphone_umts.rc into a text editor that preserves unix end-line format (e.g.: notepad++). Find all entries of “/system/bin/logwrapper” replacing for “/system/bin/mylogwrapper”.
34. In init.mapphone_umts.rc find entry for “exec /init_prep_keypad.sh” replacing for “exec /system/bin/init_prep_keypad.sh”. Add the following text to the end of this file to be able to run all scripts in /system/etc/init.d at boot time:
Code:
service bootscripts /system/bin/sysinit
class post-zygote_services
disabled
oneshot
35. Save and close.
36. C:\> adb push init.rc /system/etc/rootfs/
37. C:\> adb push init.mapphone_umts.rc /system/etc/rootfs/
38. # chmod 755 /system/etc/rootfs/init.rc
39. # chmod 755 /system/etc/rootfs/init.mapphone_umts.rc
40. Choose “Reboot system now” in clock recovery menu;
You’re all set! Now it is just a matter of changing the rc files in /system/etc/rootfs to customize your system boot.
If you want to log the system boot you may also copy the provided log-init.sh script into /system/etc/rootfs and uncomment the line “exec /log_init.sh” from my init.rc file. Doing so will create the /data/logcat.log file that may get huge in sometime.
2nd-init files and my modified *.rc files attached.
Have fun!
UPDATED to version 2.0.0 (froyo) this version exploits /system/bin/mount_ext3.sh instead of sh binary. It's a new method I developed in order of starting 2nd-init earlier but also keeping compatibility with Droid2bootstrapper (recovery takes place first). This might help me booting Leaked GB from 2nd-init, which wasn't possible on the previous version. Take note it's not ready yet to apply on GB.
I just missed the exec /system/bin/init_prep_keypad thanks!
What is this for?
Sent from my A953 using XDA App
inheme said:
What is this for?
Sent from my A953 using XDA App
Click to expand...
Click to collapse
A method to customize initialization scripts of android system. It's a major hack used be some Milestone1 custom ROM's. I've succeeded into porting this to MS2, and I think some modders here of XDA may be interested into adding this to custom ROM's. It may be added to the stock ROM (as I did) but it is not something that everyone is willing to try.
Word of advise: If you don't know what it is you don't need it
Ok thanks for the explanation
So it means that custom roms will be easier to create?
Sent from my A953 using XDA App
That's some major news for our little community.
Tell me if I'm wrong, but since init starts after the kernel is loaded, it's not useful at all for loading a custom kernel, true?
But having a custom init script is a step to CyanogenMod 6 port on Milestone 2, still true?
Anyways, great job, and great howto.
momus87 said:
That's some major news for our little community.
Tell me if I'm wrong, but since init starts after the kernel is loaded, it's not useful at all for loading a custom kernel, true?
Click to expand...
Click to collapse
To load a custom kernel we'll need that kexec hack that team freemymoto is working on.
But having a custom init script is a step to CyanogenMod 6 port on Milestone 2, still true?
Click to expand...
Click to collapse
Well, it's possible, but I believe the big issue here is the impossibility of running custom kernels. Even so, a skilled Modder may be able to overcome that and port CM6 to MS2 using Motorola's stock kernel. It has been done for the MS1.
Anyways, great job, and great howto.
Click to expand...
Click to collapse
You're welcome.
Thanks, r2beta0... this is going to help us out a lot!
r2beta0 said:
Well, it's possible, but I believe the big issue here is the impossibility of running custom kernels. Even so, a skilled Modder may be able to overcome that and port CM6 to MS2 using Motorola's stock kernel. It has been done for the MS1.
You're welcome.
Click to expand...
Click to collapse
Guess that would be me
nah just kidding. I've just happened to have some luck porting Froyo and Gingerbread to the bootloader-locked x10 mini pro. I've just ordered my milestone 2 and I will work on CM6. AWESOME JOB on the 2nd init man! Really, thanks!!
edit: just can't stop thanking you! You saved me a lot of work and porting CM will be easy as sh*t for me now! THANKS
Mikevhl said:
Guess that would be me
nah just kidding. I've just happened to have some luck porting Froyo and Gingerbread to the bootloader-locked x10 mini pro. I've just ordered my milestone 2 and I will work on CM6. AWESOME JOB on the 2nd init man! Really, thanks!!
edit: just can't stop thanking you! You saved me a lot of work and porting CM will be easy as sh*t for me now! THANKS
Click to expand...
Click to collapse
You're welcome! You can count on me to provide as much help as I can to free our MS2's from Motorola's hand. I would be very grateful if you could share your knowledge of porting CM to locked devices. I was trying to port MIUI and Shadow mod BR to MS2 but I got stuck when dealing with proprietary files.
Sent from my A953 using XDA App
@r2beta0
Could this port work on Motorola defy?
Sent from my MOTO Defy
demolition23 said:
@r2beta0
Could this port work on Motorola defy?
Sent from my MOTO Defy
Click to expand...
Click to collapse
It's very likely, since the 2 devices are very similar. Most of the files I attached are from Milestone1 and works perfectly on MS2. Though I recommend you to NOT replace your *.rc files with the attached ones since they could be not compatible. It would be better if you edit your own files. Also try it ONLY if you have a working version of ClockworkMod Recovery (or other custom recovery). You may adapt this guide for your device and post it here on XDA, just remember to mention my name on credits
Already posted and hoping someone to port this..
http://forum.xda-developers.com/showthread.php?t=1003449
demolition23 said:
Already posted and hoping someone to port this..
http://forum.xda-developers.com/showthread.php?t=1003449
Click to expand...
Click to collapse
BTW, why do you want to use 2nd-init? You know, this guide is more inclined for devs/mods who want (need) to include this feature on their ROM's. With this you can change the way things are loaded on linux system before android starts up. But to take advantage of that you should know a lot about how linux works and so on. Regular users should look for a ROM based on the features he needs. Most ROM's already have 2nd-init implemented, but it's not something users are aware of.
Possible issue I've come across:
When replacing sh, i can no longer re-open the shell for obvious reasons... potentially I need to already have a second terminal open with shell running in it already?
SBFing and trying again :3
smacky_wolf said:
Possible issue I've come across:
When replacing sh, i can no longer re-open the shell for obvious reasons... potentially I need to already have a second terminal open with shell running in it already?
SBFing and trying again :3
Click to expand...
Click to collapse
I had no such issue here. When executing the steps of this guide I kept two windows opened all the time. One command prompt to run adb push/pull and another window running adb shell.
Thanks to point that out! I will post a warning in the main post. You should have a adb shell window already running to be able to run chmod just after replacing sh.
But don't worry, you don't need to SBF. Just reboot into clockwork recovery, mount /system via menu, and open your adb shell. It uses a different shell so you can fix the problem in /system/bin.
Looks like Motorola Defy now has CyanogenMod 7 using 2nd-init script! Wish same were the case for MS2.
syl0n said:
Looks like Motorola Defy now has CyanogenMod 7 using 2nd-init script! Wish same were the case for MS2.
Click to expand...
Click to collapse
I'm on it, but development is slow
No necessary to use 2nd init.
Just install "droid 2 bootstrap" and Rom Manager will work perfectly.
keylight65 said:
No necessary to use 2nd init.
Just install "droid 2 bootstrap" and Rom Manager will work perfectly.
Click to expand...
Click to collapse
What are you talking about? This guide isn't related to ROM Manager.

[SOLVED] - Manually enable adb debugging from recovery

First off, this may seem a noob question, but I am definitely not.
I have an Iconia A200 that now has a broken lcd screen. No display, no touch. I am able to get into the tablet from TWRP via adb, but not from Android (Jelly Bean). It seems I never enabled usb debugging when I installed the custom rooted rom.... I can access the file system and modify anything... Which files need to be modified to enable debugging in Android? Here is what I tried:
Added to default.prop and /system/build.prop
Code:
persist.service.adb.enable=1
persist.service.debuggable=1
persist.sys.usb.config=mtp,adb
Edit: Must have had typos... It now works.
workdowg said:
First off, this may seem a noob question, but I am definitely not.
I have an Iconia A200 that now has a broken lcd screen. No display, no touch. I am able to get into the tablet from TWRP via adb, but not from Android (Jelly Bean). It seems I never enabled usb debugging when I installed the custom rooted rom.... I can access the file system and modify anything... Which files need to be modified to enable debugging in Android? Here is what I tried:
Added to default.prop and /system/build.prop
Code:
persist.service.adb.enable=1
persist.service.debuggable=1
persist.sys.usb.config=mtp,adb
Edit: Must have had typos... It now works.
Click to expand...
Click to collapse
Ok Sounds good for you. Can you changed the title of your thread by [SOLVED]
Thanks in advance
philos64 said:
Ok Sounds good for you. Can you changed the title of your thread by [SOLVED]
Thanks in advance
Click to expand...
Click to collapse
Ooops.... :good:
How would i do this with my skyrocket? same problem, broken screen, adb disabled. Some instructions would be sweet, cause im not really clear with what you did here.
workdowg said:
First off, this may seem a noob question, but I am definitely not.
I have an Iconia A200 that now has a broken lcd screen. No display, no touch. I am able to get into the tablet from TWRP via adb, but not from Android (Jelly Bean). It seems I never enabled usb debugging when I installed the custom rooted rom.... I can access the file system and modify anything... Which files need to be modified to enable debugging in Android? Here is what I tried:
Added to default.prop and /system/build.prop
Code:
persist.service.adb.enable=1
persist.service.debuggable=1
persist.sys.usb.config=mtp,adb
Edit: Must have had typos... It now works.
Click to expand...
Click to collapse
MikeMobes said:
How would i do this with my skyrocket? same problem, broken screen, adb disabled. Some instructions would be sweet, cause im not really clear with what you did here.
Click to expand...
Click to collapse
MikeMobes said:
How would i do this with my skyrocket? same problem, broken screen, adb disabled. Some instructions would be sweet, cause im not really clear with what you did here.
Click to expand...
Click to collapse
I'm going to stay general and assume that a skyrochet is a phone, you have a linux or windows pc with ADB installed (and the drivers to connect to your phone) and have TWRP or CWM Recovery installed already...
1) Start the phone in recovery mode - mine is power down and vol
2) Connect you cable to the pc and start a console terminal or cmd prompt
3) Run the following
Code:
adb shell
su
mount -o remount,rw /system
cd /
echo "persist.service.adb.enable=1" >> default.prop
echo "persist.service.debuggable=1" >> default.prop
echo "persist.sys.usb.config=mtp,adb" >> default.prop
echo "persist.service.adb.enable=1" >> /system/build.prop
echo "persist.service.debuggable=1" >> /system/build.prop
echo "persist.sys.usb.config=mtp,adb" >> /system/build.prop
Once you reboot into Android you should be able to connect via adb.
If you google vnc over adb you can get a usable but very slow vnc connection then install Andriod VNC server for a little better performance.
That's the best I can do from memory ...
workdowg said:
I'm going to stay general and assume that a skyrochet is a phone, you have a linux or windows pc with ADB installed (and the drivers to connect to your phone) and have TWRP or CWM Recovery installed already...
1) Start the phone in recovery mode - mine is power down and vol
2) Connect you cable to the pc and start a console terminal or cmd prompt
3) Run the following
Code:
adb shell
su
mount -o remount,rw /system
cd /
echo "persist.service.adb.enable=1" >> default.prop
echo "persist.service.debuggable=1" >> default.prop
echo "persist.sys.usb.config=mtp,adb" >> default.prop
echo "persist.service.adb.enable=1" >> /system/build.prop
echo "persist.service.debuggable=1" >> /system/build.prop
echo "persist.sys.usb.config=mtp,adb" >> /system/build.prop
Once you reboot into Android you should be able to connect via adb.
If you google vnc over adb you can get a usable but very slow vnc connection then install Andriod VNC server for a little better performance.
That's the best I can do from memory ...
Click to expand...
Click to collapse
I'm booted into twrp 2.6.3 and when i try to run adb devices i just get this
Code:
[email protected]:~$ adb devices
List of devices attached
???????????? no permissions
That Baker Guy said:
I'm booted into twrp 2.6.3 and when i try to run adb devices i just get this
Code:
[email protected]:~$ adb devices
List of devices attached
???????????? no permissions
Click to expand...
Click to collapse
Enter the following commands:
Code:
adb kill-server sudo ./adb start-server adb devices
The issue is your not running adb server as root.
Hello. Does possible enable accesibility and set default tts via adb shell, and edit default.prop and build.prop?
Thanks and best regards.
workdowg said:
I'm going to stay general and assume that a skyrochet is a phone, you have a linux or windows pc with ADB installed (and the drivers to connect to your phone) and have TWRP or CWM Recovery installed already...
1) Start the phone in recovery mode - mine is power down and vol
2) Connect you cable to the pc and start a console terminal or cmd prompt
3) Run the following
Code:
adb shell
su
mount -o remount,rw /system
cd /
echo "persist.service.adb.enable=1" >> default.prop
echo "persist.service.debuggable=1" >> default.prop
echo "persist.sys.usb.config=mtp,adb" >> default.prop
echo "persist.service.adb.enable=1" >> /system/build.prop
echo "persist.service.debuggable=1" >> /system/build.prop
echo "persist.sys.usb.config=mtp,adb" >> /system/build.prop
Once you reboot into Android you should be able to connect via adb.
If you google vnc over adb you can get a usable but very slow vnc connection then install Andriod VNC server for a little better performance.
That's the best I can do from memory ...
Click to expand...
Click to collapse
OMG! After my screen broke, i raged and became hulk. After 3 hours of internet-searching the hulk found your post and released me to become bruce banner again...
The thank you button was just not enough!
Sorry to resurrect a dead thread, but I need a bit more help with this. I've successfully followed these instructions to enable the adb service on my i9505 with a dead screen, however it hasn't authorised it. When I try to connect I get the following error: error: device unauthorized. Please check the confirmation dialog on your device.
Is there anyway to bypass this confirmation dialog from ADB in recovery (Philz Touch)?
Thanks.
pnz said:
Sorry to resurrect a dead thread, but I need a bit more help with this. I've successfully followed these instructions to enable the adb service on my i9505 with a dead screen, however it hasn't authorised it. When I try to connect I get the following error: error: device unauthorized. Please check the confirmation dialog on your device.
Is there anyway to bypass this confirmation dialog from ADB in recovery (Philz Touch)?
Thanks.
Click to expand...
Click to collapse
I Googled it a little and it seems to be a Samsung thing. Apparently it isn't booting to recovery. Sorry for the lack help
From my Debloated Stock Kitkat VS980 4G VZN
workdowg said:
I Googled it a little and it seems to be a Samsung thing. Apparently it isn't booting to recovery. Sorry for the lack help
From my Debloated Stock Kitkat VS980 4G VZN
Click to expand...
Click to collapse
No, I'm quite sure it is booting to my custom recovery, as I have full ADB access to that. What I'm trying to do is enable ADB access to the Android 4.4.2 proper from my custom recovery. So far following the instructions in this thread I've managed to enable ADB there, but whenever you try to connect to this phone a dialog box is meant to come up asking if you want to accept incoming ADB requests from your computer's key. Unfortunately I have no way of selecting accept (or even seeing that dialog box), so I'm hoping there's a way to bypass it.
Hey mate,
Sorry to necro-bumb the thread. I have been reading and have much similar issue to your self. Maybe some drivers that automatically enable adb, android usb or MTP without debugging enabled might be something to take a look at?
Check this thread out >>> here
Hope that might help (you and I both?)
Besides that I am still searching for a post I saw where you can edit the init-rc in the kernel (the guy explained how to extract the boot.img) and then decompile the kernel, edit the init-rc, recompile the kernel and then flash it back in recovery.
At the moment I am really stuck with a customer device that is bricked, so have a bash script and busybox binary that loads from a signed update.zip that should allow editing of the init-rc and add the lines mentioned in this thread to the build.prop and system.prop.
Fingers crossed it works for a completely stock device :fingers-crossed:
Jarmezrocks said:
Hey mate,
Sorry to necro-bumb the thread. I have been reading and have much similar issue to your self. Maybe some drivers that automatically enable adb, android usb or MTP without debugging enabled might be something to take a look at?
Check this thread out >>> here
Hope that might help (you and I both?)
Besides that I am still searching for a post I saw where you can edit the init-rc in the kernel (the guy explained how to extract the boot.img) and then decompile the kernel, edit the init-rc, recompile the kernel and then flash it back in recovery.
At the moment I am really stuck with a customer device that is bricked, so have a bash script and busybox binary that loads from a signed update.zip that should allow editing of the init-rc and add the lines mentioned in this thread to the build.prop and system.prop.
Fingers crossed it works for a completely stock device :fingers-crossed:
Click to expand...
Click to collapse
Hi mate, did you manage to get into the customers mobile? I have the same problem as I'm locked out with no access to enable USB debugging and a home button which does not work, meaning I can't load recovery mode to wipe the phone
Sent from my C6903 using XDA app
workdowg said:
Code:
echo "persist.service.adb.enable=1" >> default.prop
echo "persist.service.debuggable=1" >> default.prop
echo "persist.sys.usb.config=mtp,adb" >> default.prop
echo "persist.service.adb.enable=1" >> /system/build.prop
echo "persist.service.debuggable=1" >> /system/build.prop
echo "persist.sys.usb.config=mtp,adb" >> /system/build.prop
Click to expand...
Click to collapse
Thank you, I had no clue how, but my phone's (MUCH Snail, aka MUCH W1, aka MUCH 78P01) manufacturer (China's Snail Mobile) had removed from Android's Developer Options menu the option to Enable/Disable USB Debugging.
I was looking all over the web for days, this was the only way I could effectively turn on USB debugging in my phone. Thanks!
There's only one difference, instead of performing the above steps from an ADB console window (for obvious reasons) I did it with Build.prop Editor, but first I needed to change permissions to 666 on the default.prop file (otherwise it wouldn't save my changes).
Curiously, every time I do a full reboot the default.prop file somehow is overwritten with the manufacturer's original settings - that doesn't happen when I soft reboot my device though. Any clues as to what could be reversing my changes at boot?
wmoecke said:
Thank you, I had no clue how, but my phone's (MUCH Snail, aka MUCH W1, aka MUCH 78P01) manufacturer (China's Snail Mobile) had removed from Android's Developer Options menu the option to Enable/Disable USB Debugging.
I was looking all over the web for days, this was the only way I could effectively turn on USB debugging in my phone. Thanks!
There's only one difference, instead of performing the above steps from an ADB console window (for obvious reasons) I did it with Build.prop Editor, but first I needed to change permissions to 666 on the default.prop file (otherwise it wouldn't save my changes).
Curiously, every time I do a full reboot the default.prop file somehow is overwritten with the manufacturer's original settings - that doesn't happen when I soft reboot my device though. Any clues as to what could be reversing my changes at boot?
Click to expand...
Click to collapse
Everytime you boot your phone, the root path is extracted from ramdisk which is usually bound to kernel. As a result, your modification is overwritten. In order to modify files under root path(such as default.prop), you must change the file in ramdisk.
There is many tools and tutorials about this task, I think this is a good point to google.
Addition:
The poster of this thread try to edit default.prop via adb, which is not possible to achieve, at least, for every android device I has hold.
For the unauthorized issue, It's because secure adb, which could be disabled via ro.adb.secure=0, but if there is a ro.adb.secure=1 in default.prop, modification of ramdisk is needed.
Given92 said:
Everytime you boot your phone, the root path is extracted from ramdisk which is usually bound to kernel. As a result, your modification is overwritten. In order to modify files under root path(such as default.prop), you must change the file in ramdisk.
There is many tools and tutorials about this task, I think this is a good point to google.
Addition:
The poster of this thread try to edit default.prop via adb, which is not possible to achieve, at least, for every android device I has hold.
For the unauthorized issue, It's because secure adb, which could be disabled via ro.adb.secure=0, but if there is a ro.adb.secure=1 in default.prop, modification of ramdisk is needed.
Click to expand...
Click to collapse
I had edited both default.prop AND /system/build.prop not knowing which one to use. This worked for me on JB and I used the tablet for a while after that.
From my Nexus 9
workdowg said:
I had edited both default.prop AND /system/build.prop not knowing which one to use. This worked for me on JB and I used the tablet for a while after that.
From my Nexus 9
Click to expand...
Click to collapse
In my view, the /system/build.prop works.
I am a huge noob and i dont really understand where i am inputing that code ?
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.
C:\Windows\system32>adb shell
'adb' is not recognized as an internal or external command,
operable program or batch file.
C:\Windows\system32>su
'su' is not recognized as an internal or external command,
operable program or batch file.
C:\Windows\system32>mount -o remount,rw /system
'mount' is not recognized as an internal or external command,
operable program or batch file.
C:\Windows\system32>cd /
C:\>echo "persist.service.adb.enable=1" >> default.prop
C:\>echo "persist.service.debuggable=1" >> default.prop
C:\>echo "persist.sys.usb.config=mtp,adb" >> default.prop
C:\>echo "persist.service.adb.enable=1" >> /system/build.prop
The system cannot find the path specified.
C:\>echo "persist.service.debuggable=1" >> /system/build.prop
The system cannot find the path specified.
C:\>echo "persist.sys.usb.config=mtp,adb" >> /system/build.prop
The system cannot find the path specified.
C:\>
Getting this on S$..any1 here to help me!

What bloatware is safe to uninstall?

Hi,
I couldn't find a thread already on this with a quick search so I was wondering if anyone knows what bloatware apps, User or System, would be safe to uninstall with a rooted phone?
By safe I mean either:
Has no impact on any other functions and if you don't want the features that the app provides you can uninstall it/freeze it/disable it
Can be uninstalled/disabled/frozen with no major impact on device functionality but with some exceptions that if a user is ok with these exceptions not to work then it is otherwise safe to uninstall/freeze/disable (for example say uninstalling a certain system app breaks NFC but you don't care about NFC anyway)
I basically would like to see if this helps with speeding up the phone as, although there is 3GB of RAM, when clearing all recent apps, 2GB is still used up by, I can only assume, system apps and the OS and perhaps some of these are RAM hoggers that I don't need/want anyway.
Thanks for any help/advice
I personally go by what apps can be found in the app drawer
(Aside the obvious e.g settings app)
Sent from my D6503 using XDA-Developers mobile app
apks of MM .185 on Z5 Compact
I've been doing a lot of debloating some weeks ago, mainly to try to decrease idle battery drain on my Z5 Compact (without much success...)
So I may share my understanding and sorting of system apks by topic and importance.
These are from MM .185 on Z5 Compact (hope all Z5 models have the same apps).
I'm going to post the content of some input file to a script I execute in TWRP, which moves the apk listed in the non-commented lines (lines not starting with a #) in /system/__REMOVED/.
The current state of removed (lines starting with /) vs kept (lines starting with #) is what I consider safe and sane for now. But lots of # app can be removed without any side effects (see comments). It boots and works ok if you remove all the apks listed, except the ones in the latest 2 sections.
(Full content, sorry if it hurts, but it will allow people to find this post if they search XDA for one of the listed apk - like I had been doing for days).
Most have obvious names, so we get what they do. Some others are less obvious, and I give in the comment line before them what i found out (or just guess) they do.
# Started with elements from from XPower 1.0
# http://forum.xda-developers.com/z5-compact/development/rom-xpower-v1-0-aroma-debloat-custom-t3371100
# Also see for a full detailed list of Lollipop apps
# https://docs.google.com/spreadsheets/d/1geFByRKDTOOZSIBOixO2boG1_78NUjqzkB6iozzJ4-k/htmlview#
# 20160520 : tested a few days with some extreme debloat, but no effect on battery usage
# So, we go easier, and we let some app that otherwise would cause warnings in logcat
#########################################
### The obvious bloat
# Other than /system/app/priv-app :
/system/recovery-from-boot.p
# Lots of bloat in etc/product
/system/etc/product
# Not much in these dirs, and these looks like low-level stuff (nativeaudiolatency, servicemenu...), better keep them :
# /system/vendor/overlay
# /system/vendor/app
# Google apps
/system/app/Chrome
/system/app/Drive
/system/app/Gmail2
/system/app/Photos
/system/app/Hangouts
/system/app/Music2
/system/app/Videos
/system/app/YouTube
/system/app/Maps
/system/app/talkback
/system/priv-app/Velvet
# We keep google TTS, we get logcat warnings if no tts available
# /system/app/GoogleTTS
# Sony themes/wallpapers
/system/app/BasicDreams
/system/app/Galaxy4
/system/app/HoloSpiralWallpaper
/system/app/LiveWallpapers
/system/app/LiveWallpapersPicker
/system/app/NoiseField
/system/app/PhaseBeam
/system/app/photoslideshow-release
/system/app/PhotoTable
/system/app/experienceflow2livewallpaper-release
/system/vendor/overlay/overlay-semcexperienceflow2-300-release.apk
# Themes stuff (work without, but we may need to keep it to get black lockscreen wallpaper)
# No, Album should be enough to allow us to pick wallpapers
/system/app/skin-core-release
/system/app/skin-picker-release
/system/app/theme-manager-release
# We keep themes 000 (rainbow) and 006 007 008 (grey, black & white)
# No, we keep only 007 black, just in case
/system/app/Theme000-sw360dp-xhdpi-release
/system/app/Theme001-sw360dp-xhdpi-release
/system/app/Theme002-sw360dp-xhdpi-release
/system/app/Theme003-sw360dp-xhdpi-release
/system/app/Theme004-sw360dp-xhdpi-release
/system/app/Theme005-sw360dp-xhdpi-release
/system/app/Theme006-sw360dp-xhdpi-release
# /system/app/Theme007-sw360dp-xhdpi-release
/system/app/Theme008-sw360dp-xhdpi-release
# Sony updates/accounts/services
/system/app/com.sonyericsson.xhs
/system/app/com.sonymobile.xperialounge.services
/system/app/Lifelog-googlePreloadLive-release-2.9.P.3.8-5377032
/system/priv-app/GetMore-stub-release
/system/priv-app/somc-get-to-know-it-release
/system/priv-app/MyXperia
/system/priv-app/RecommendationEngineExtension-release
/system/priv-app/UpdateCenter-release
# Sonyentrance = Whats new
/system/priv-app/sonyentrance2-release
/system/app/SyncHub-release
/system/app/SemcWarrantyTime
/system/app/sneiaccountmanager-live
/system/app/support
/system/app/DemoAppChecker
/system/priv-app/retaildemo
# Sony & parners apps
/system/app/PhotoWidget-release
/system/app/WikipediaPlugin
/system/app/YouTubeKaraokePlugin
/system/app/YouTubePlugin
/system/app/WorldClockWidget-release
/system/app/WeatherWidget-release
/system/app/facebook-appmanager-xhdpi
/system/priv-app/facebook-installer
/system/priv-app/com.mobisystems.fileman
# We keep clock widgets
# /system/app/ClockWidgets-release
#########################################
### The less obvious bloat
# For Xperia companion (?) that we don't use anymore (we use Flashtool)
/system/priv-app/usb-mtp-backup-transport
/system/priv-app/usb-mtp-factoryreset-wrapper
/system/priv-app/usb-mtp-fotaupdate-wrapper
/system/priv-app/usb-mtp-update-wrapper
/system/priv-app/usb-mtp-vendor-extension-service
# Sony apps/features we don't really care about
/system/app/TouchBlock
/system/app/gmail-reader-service
/system/app/GoogleLyricsPlugin
/system/app/HTMLViewer
/system/app/TopContactsWidget-release
/system/app/weather-release
/system/app/XperiaTransferMobile-release
/system/app/cover-widget
/system/priv-app/CoverApp
/system/priv-app/ActiveClipper
# We only keep SmallAppManagerService : avoid warnings in logcat (but yet no small app)
# /system/priv-app/SmallAppManagerService-release
/system/priv-app/SmallApp-Calculator-release
/system/priv-app/SmallAppsFramework-release
/system/priv-app/SmallAppsLauncher-release
/system/priv-app/SmallApp-Timer-release
/system/priv-app/SmallAppWidget-release
# We keep Sony Tasks, Agenda has some dependancies on it (otherwise logcat warnings)
# /system/app/Tasks
# We will reinstall updated Album from Store
/system/priv-app/album-albumLive-release
# To edit pictures in case we need to
# /system/priv-app/SemcPhotoEditor
# Other apps we don't care about
/system/priv-app/SomcPhotoAnalyzer
/system/app/SomcMovieCreatorRmm-release
/system/priv-app/SomcMovieCreator-release
/system/priv-app/SemcVideo
/system/priv-app/SemcMusic
/system/priv-app/SomcPodcast
/system/priv-app/SemcEmail
# Sony Video store
/system/priv-app/SnpVUStore
# Music Metadata
/system/app/SemcMetadataCleanup
# Camera gadget addons
/system/priv-app/ArtFilterCamera-xhdpi-release
/system/app/ar-effect
/system/priv-app/SemcCamera3D-xhdpi-release
/system/priv-app/StylePortrait
/system/app/StyleBlue-release
/system/app/StyleBubble-release
/system/app/StyleDaily-release
/system/app/StylePaint-release
/system/app/StyleRed-release
/system/app/StyleStar-release
/system/app/StyleSunshine-release
/system/app/StyleSuntan-release
/system/priv-app/DualCamera-xhdpi-release
/system/priv-app/FaceFusionCamera-xhdpi-release
/system/priv-app/OnlineRemoteCamera-xhdpi-release
/system/priv-app/SoundPhotoCamera-xhdpi-release
/system/priv-app/CameraWearableBridgeHandheldServer
# Tv & wireless sharing
/system/app/dlna-somc-xhdpi-release
/system/priv-app/SemcTvOut
/system/priv-app/SomcMirrorLinkManualSwitch
/system/priv-app/SomcMirrorLinkServer
/system/priv-app/SomcMirrorLinkSystem
/system/priv-app/SomcPlayAnywhere
# We let everything "wifi display", not really clear what is sony/qualcomm/atfWD
# and what makes Chromecast or Miracast in settings...
# (ATFWD may mean AT command forward, which would be completely something else)
# Could be added to build.prop : persist.radio.atfwd.start=false
# /system/priv-app/SomcWifiDisplay
# Qualcomm Wifi display
# /system/app/WfdService
# Gamepad, smartwatch, heartbeat & co
/system/app/AntHalService
/system/priv-app/livewaremanager
/system/app/DualShockManager
/system/app/RemoteControlService
# Asian keyboards
/system/app/ExternalKeyboardJP
/system/app/SomcPOBox
/system/priv-app/textinput-chn-xhdpi
# Intelligent stuff
/system/app/Iengine
/system/app/IntelligentBacklight
/system/app/IntelligentObserver
/system/priv-app/IntelligentGesture
/system/app/FaceLock
# OverTheAir stuff
/system/app/OmaDownload
/system/app/OmaV1AgentDownloadServices
/system/app/fota-service
/system/priv-app/OMAClientProvisioning-release
# This app deletes some becknmark apps and block access to android forums (launched in
# some very specific context ?!)
/system/app/pip
# Sony background services, crash & usage reporting
/system/app/AnonymousData
/system/app/CrashMonitor
/system/app/CrashMonitorSystem
/system/app/IddAgent
/system/app/RcaHandler
/system/app/phone-usage
/system/app/device-monitor
/system/app/GoogleAnalyticsProxy
# Setting "Storage/Move stuff to Sd Card" will Force-Close without this
# but it checks disk usage every 10 minutes ! :
/system/priv-app/SemcStorageChecker
# Xperia configurator/Enterprise/Cloud backup...
/system/app/DeviceConfigTool
# Exchange & Enterprise stuff
/system/app/Exchange3Google
/system/priv-app/Exchange2
/system/app/SomcEnterpriseInstallationService
/system/priv-app/EnterpriseService
/system/app/OneTimePassLockScreenApp
/system/priv-app/RemoteUnlockService
# DRM stuff : we keep them, may be needed for Sony own drm stuff
# /system/app/DrmDialogs
# /system/app/SecureClockService
# /system/priv-app/DtcpCtrl-release
# /system/app/KerberosService
# Works fine without all that :
# These creates some bookmarks sqlite dbs
# /system/app/BookmarkProvider
# /system/app/PartnerBookmarksProvider
# /system/priv-app/BackupRestoreConfirmation
# /system/priv-app/EmergencySms
# Backup on SD card
# /system/priv-app/SharedStorageBackup
# We keep this one to avoir warnings in logcat
# /system/app/PrintSpooler
# These two do not prevent the SIM card and phone from working :
# "Sim service" app : if kept, our carrier icon is recreated in Home launcher at each boot
/system/app/Stk
/system/app/SmartcardService
# /system/app/TetherEntitlementCheck
# May help start SIM card pin earlier (?)
# /system/app/StartupFlagV2
# Rich content services ? We can keep them, may be used by SMS/MMS
# /system/app/rcs-startup
# /system/priv-app/RcsVideoShare
# /system/priv-app/rcs-core
# /system/priv-app/rcs-settings
# Low level GSM/network stuff
# Works without these, but do not change battery usage, so let's keep them
# /system/priv-app/CNEService
# /system/priv-app/QtiTetherService
# /system/priv-app/fast-dormancy-wakeup
# /system/priv-app/qcrilmsgtunnel
###############################################
# 20150517 : boots and works OK without the following ones,
# but some features are obviously lost
# Bluetooth & NFC
# /system/app/Bluetooth
# /system/app/NfcNci
# /system/app/BluetoothMidiService
# /system/app/AptxNotifier
# Camera
# /system/app/CameraAddonPermission-release
# /system/app/CameraCommonPermission-release
# /system/app/CameraExtensionPermission-release
# /system/priv-app/CameraCommon
# /system/priv-app/SemcCameraUI-generic-xhdpi-release
# /system/priv-app/SuperVideoCamera-xhdpi-release
# Wifi (CaptivePortal = free wifi access points with intermediate web page ?)
# /system/app/CaptivePortalLogin
# /system/app/HotspotAdvancedSetting
# /system/priv-app/SomcWifiService
# Used to raise power when acting as a hotspot, and decrease it when power is low :
# /system/app/TransmitPower
# Fingerprint (works ok without this Sony one), but :
# java.lang.Exception: The FPC extension service could not be loaded
# /system/priv-app/SomcFingerprint
# /system/app/FingerprintServiceExtension
# Fingerprint "FIDO" stuff, fingerprint unlock works without these two apk
# /system/app/FingerprintASM
# Other FIDO stuff (not in CM13)
# /system/app/FidoClient
# /system/priv-app/FidoCryptoService
# Other Sony stuff we can remove
# /system/app/HeadphoneSelection
# /system/app/UnsupportedHeadsetNotifier
# /system/app/SemcAutoPowerOff
# /system/app/SemcPowerSaveModule
# Cnap = Calling Name Provider
# /system/app/SemcCnapProvider
# Restart if SIM inserted/removed popup
# /system/app/SemcSimDetection
# /system/app/TouchFilterPackageSwitchService
# This one installs packages (?)
# /system/app/package-courier-release
# Sound
# /system/app/SoundEnhancement
# /system/priv-app/MusicFX
# /system/priv-app/SoundRecorder
# Sony images enhancement
# Let's keep it to validate drmrestore
# /system/app/ImageEnhancer
# /system/app/ImageProcessorPermission-release
# Standard stuff (also in CM13)
# /system/app/PacProcessor
# /system/app/Radio3
# /system/app/WAPPushManager
# WapPush is Sony only
# /system/priv-app/WapPush
# /system/app/white-balance
# /system/priv-app/ApnUpdater-release
# /system/priv-app/CallLogBackup
# /system/priv-app/CredentialManagerService
# /system/priv-app/CustomizationSelector-xhdpi-release
# /system/priv-app/CustomizedSettings-release
# Low level security (IMEI, SIM, S1 cert...) :
# /system/priv-app/DeviceSecurityService
# /system/priv-app/ExtendedBootLockService
# /system/priv-app/ScreenRecording
# /system/priv-app/SimlockUnlockApp
# /system/priv-app/SmartSearch
# /system/priv-app/TopContactsProvider
# /system/priv-app/VpnDialogs
# Lots of location services in this Qualcomm app
# /system/priv-app/com.qualcomm.location
# USB stuff, mainly for japanese carrier ? (not many translations in ressources)
# /system/priv-app/enhancedusbux
###############################################
# Google core stuff
# Apps included in Open Gapps PICO :
# ConfigUpdater
# GoogleBackupTransport
# GoogleContactsSyncAdapter
# GoogleFeedback
# GoogleLoginService
# GoogleOneTimeInitializer
# GooglePartnerSetup
# GoogleServicesFramework
# Phonesky
# PrebuiltGmsCore
# SetupWizard
# Stock Google stuff, that we can remove if we want to install Gapps pico instead
# /system/app/GoogleCalendarSyncAdapter
# /system/app/GoogleContactsSyncAdapter
# /system/priv-app/ConfigUpdater
# /system/priv-app/GoogleBackupTransport
# /system/priv-app/GoogleFeedback
# /system/priv-app/GoogleLoginService
# /system/priv-app/GoogleOneTimeInitializer
# /system/priv-app/GooglePackageInstaller
# /system/priv-app/GooglePartnerSetup
# /system/priv-app/GoogleServicesFramework
# /system/priv-app/Phonesky
# /system/priv-app/GmsCore
# /system/priv-app/SetupWizard
# We can remove some of them, but some others of them are needed : otherwise, bootloop.
###############################################
# 20150517 : apk we still keep (probably all essentials)
# /system/app/CertInstaller
# /system/app/ClockWidgets-release
# /system/app/CoreSettings
# /system/app/DocumentsUI
# /system/app/DownloadProviderUi
# /system/app/ExactCalculator
# /system/app/ExternalKeyboardsInternational
# /system/app/KeyChain
# /system/app/LockscreenSettings-release
# /system/app/SemcSettings
# /system/app/ServiceMenu
# /system/app/TimeService
# /system/app/UserDictionaryProvider
# /system/app/WebViewGoogle
# /system/app/app-textInputLive-release
# /system/app/bootinfo
# /system/app/duidgenerator
# /system/app/home-release
# /system/app/telresources
# /system/app/wallpaperpicker-release
# /system/app/xperia-keyboard-dictionaries
# /system/priv-app/CalendarProvider
# /system/priv-app/CarrierConfig
# /system/priv-app/Conversations
# /system/priv-app/DefaultContainerService
# /system/priv-app/DownloadProvider
# /system/priv-app/ExternalStorageProvider
# /system/priv-app/FusedLocation
# /system/priv-app/InCallUI
# /system/priv-app/InputDevices
# /system/priv-app/LocalContacts
# /system/priv-app/ManagedProvisioning
# /system/priv-app/MediaProvider
# /system/priv-app/MmsService
# /system/priv-app/Phonebook
# /system/priv-app/ProxyHandler
# /system/priv-app/SEMCSetupWizard
# /system/priv-app/SemcCalendar
# /system/priv-app/SemcClock
# /system/priv-app/SemcContactsProvider
# /system/priv-app/SemcTelephonyProvider
# /system/priv-app/Settings
# /system/priv-app/SettingsProvider
# /system/priv-app/Shell
# SimCotacts = services with "sdn" in names
# /system/priv-app/SimContacts
# /system/priv-app/StatementService
# /system/priv-app/SystemUI
# /system/priv-app/Tag
# /system/priv-app/TeleService
# /system/priv-app/Telecom
# /system/priv-app/WallpaperCropper
# /system/priv-app/sound-picker-release
# The end.
Thank you very much for the extensive guide and tests! Great job and good help for anyone interested in Sony's bloat
I personally focused myself on the running processes and services, searched for information about them and decompiled the strange ones, and then just hid the useless apks.
For anyone interested: freezing/disabling system apps will not prevent them from being launched and run, you need to uninstall them or hide them (which makes them unavailable to the Android system without deleting them, ready to be restored)
LolaPalocz said:
I've been doing a lot of debloating some weeks ago, mainly to try to decrease idle battery drain on my Z5 Compact (without much success...)
So I may share my understanding and sorting of system apks by topic and importance.
Click to expand...
Click to collapse
Did you encounter any problem with com.qualcomm.qti.tetherservice?
Sometimes, on reboot, i get cyclic crashing of this app, and Logcat shows that the problem lays on some uninstalled system apps (like crashmonitor or enterprise service) :
Bad call: specified package com.appname under uid 1000 but it is really -1
and then com.qualcomm.qti.tetherservice crashes because of:
SecurityException: com.appname was not granted this permission: android.permission.WRITE_SETTINGS
com.appname could be enterprise service or crashmonitor or other system apps uninstalled. They strangely seem to make qti tether app crash. Restoring one of them just makes the error trigger with another system app.
ninestarkoko said:
Did you encounter any problem with com.qualcomm.qti.tetherservice?.
Click to expand...
Click to collapse
No, it was may be among the packages I removed early, with the other Entreprise stuff.
I dont do any tethering, and I didnt encouter what you did, sorry.
Have you tried removing it ? Tethering may still work with the pure android stuff (like fingerprint still worked when I removed 2 or may be the 3 apk with fingerprint in their names).
I also checked in my archive of numerous logcats, and did not find any occurence of the string "com.appname" ...
LolaPalocz said:
I'm going to post the content of some input file to a script I execute in TWRP, which moves the apk listed in the non-commented lines (lines not starting with a #) in /system/__REMOVED/.
The current state of removed (lines starting with /) vs kept (lines starting with #) is what I consider safe and sane for now. But lots of # app can be removed without any side effects (see comments). It boots and works ok if you remove all the apks listed, except the ones in the latest 2 sections.
Click to expand...
Click to collapse
As some people requested it, here are the script and the files list.
Probably best to use it just after flashtool and fastboot flash boot+twrp, before first boot, but can be run anytime, even multiple times if you want to debloat progressively by uncommenting some lines.
In TWRP : Advanced > Terminal, then cd /externalsd/, and execute :
sh debloat.sh debloat.sane dry to see what the script would do
sh debloat.sh debloat.sane to actually move the apks into /system/__Removed/.
Forgot to say in my first post that it also removes the whole content of /oem/deletable-app/ and /oem/priv-app/ .
LolaPalocz said:
I also checked in my archive of numerous logcats, and did not find any occurence of the string "com.appname" ...
Click to expand...
Click to collapse
com.appname was a generic name for one of the system apps removed... however i'll try to remove Qti tether and see. thanks
LolaPalocz said:
As some people requested it, here are the script and the files list.
Probably best to use it just after flashtool and fastboot flash boot+twrp, before first boot, but can be run anytime, even multiple times if you want to debloat progressively by uncommenting some lines.
In TWRP : Advanced > Terminal, then cd /externalsd/, and execute :
sh debloat.sh debloat.sane dry to see what the script would do
sh debloat.sh debloat.sane to actually move the apks into /system/__Removed/.
Forgot to say in my first post that it also removes the whole content of /oem/deletable-app/ and /oem/priv-app/ .
Click to expand...
Click to collapse
Thanks for the scripts.
If I want to restore an apk I just move the apk back to its original place and reboot?
For some reason cant get it to work. Open Terminal but unable to cd to /externalsd/.
If not too much trouble could I ask you to upload it as a flashable script.zip?
Norup58 said:
Thanks for the scripts.
If I want to restore an apk I just move the apk back to its original place and reboot?
For some reason cant get it to work. Open Terminal but unable to cd to /externalsd/.
If not too much trouble could I ask you to upload it as a flashable script.zip?
Click to expand...
Click to collapse
Sorry, I dont know how to make flashable zips. And as TWRP is so nice and provides a shell (you can get it with 'adb shell' too, which is more confortable than the tiny keyboard and screen), you get more flexibility.
And it's ' cd /external_sd/ ' (with a _), where you'll find your external SD card.
And yes, to restore, you just move it back from /system/__Removed/ to its original place, and reboot.
You first have to mount /system (with twrp menu) read-write.
Also, an apk is actually in its own directory (with other stuff, libs, odex...), so we (the script, and you when you restore) are moving directories. So, if you vant to restore, you move the directory back.
Good luck.
LolaPalocz said:
Sorry, I dont know how to make flashable zips. And as TWRP is so nice and provides a shell (you can get it with 'adb shell' too, which is more confortable than the tiny keyboard and screen), you get more flexibility.
And it's ' cd /external_sd/ ' (with a _), where you'll find your external SD card.
And yes, to restore, you just move it back from /system/__Removed/ to its original place, and reboot.
You first have to mount /system (with twrp menu) read-write.
Also, an apk is actually in its own directory (with other stuff, libs, odex...), so we (the script, and you when you restore) are moving directories. So, if you vant to restore, you move the directory back.
Good luck.
Click to expand...
Click to collapse
Thanks again, got it to work....sort of....
In my case it was 'cd /sdcard/' and running the script via Minimal ADB gives a better overview :good:
Only 'issue' was the apks werent removed. Oh, they were 'backup' ok as your script said/does but had to manually deleted then afterwards. So guess to get best result one should run the script straight after 'SuperSU' has been flashed/installed (before any apks starts updating)- like you mentioned earlier
system/app/AnonymousData
system/app/ar-effect
system/app/BasicDreams
system/app/Chrome
system/app/com.sonyericsson.xhs
system/app/com.sonymobile.xperialounge.services
system/app/cover-widget
system/app/CrashMonitor
system/app/CrashMonitorSystem
system/app/DemoAppChecker
system/app/Drive
system/app/DualShockManager
system/app/ExactCalculator
system/app/experienceflow2livewallpaper-release
system/app/Exchange3Google
system/app/facebook-appmanager-xhdpi
system/app/Galaxy4
system/app/GetMoreClient-release
system/app/Gmail2
system/app/gmail-reader-service
system/app/GoogleLyricsPlugin
system/app/GoogleTTS
system/app/Hangouts
system/app/HTMLViewer
system/app/IddAgent
system/app/HoloSpiralWallpaper
system/app/Lifelog-googlePreloadLive-release-2.9.P.3.8-5377032
system/app/LiveWallpapers
system/app/LiveWallpapersPicker
system/app/Maps
system/app/Music2
system/app/NoiseField
system/app/PhaseBeam
system/app/phone-usage
system/app/Photos
system/app/photoslideshow-release
system/app/PhotoTable
system/app/PhotoWidget-release
system/app/RcaHandler
system/app/SemcWarrantyTime
system/app/sneiaccountmanager-live
system/app/support
system/app/SomcPOBox
system/app/StyleBlue-release
system/app/StyleBubble-release
system/app/StyleDaily-release
system/app/StylePaint-release
system/app/StyleRed-release
system/app/StyleStar-release
system/app/StyleSunshine-release
system/app/StyleSuntan-release
system/app/talkback
system/app/TopContactsWidget-release
system/app/TouchBlock
system/app/Videos
system/app/weather-release
system/app/WeatherWidget-release
system/app/WikipediaPlugin
system/app/WorldClockWidget-release
system/app/XperiaTransferMobile-release
system/app/YouTube
system/app/YouTubeKaraokePlugin
system/app/YouTubePlugin
system/etc/product
system/priv-app/ActiveClipper
system/priv-app/album-albumLive-release
system/priv-app/ArtFilterCamera-xhdpi-release
system/priv-app/com.mobisystems.fileman
system/priv-app/CoverApp
system/priv-app/DualCamera-xhdpi-release
system/priv-app/facebook-installer
system/priv-app/FaceFusionCamera-xhdpi-release
system/priv-app/GetMore-release
system/priv-app/livewaremanager
system/priv-app/MyXperia
system/priv-app/OnlineRemoteCamera-xhdpi-release
system/priv-app/RecommendationEngineExtension-release
system/priv-app/retaildemo
system/priv-app/SemcCamera3D-xhdpi-release
system/priv-app/SmallApp-Calculator-release
system/priv-app/SmallAppManagerService-release
system/priv-app/SmallAppsFramework-release
system/priv-app/SmallAppsLauncher-release
system/priv-app/SmallApp-Timer-release
system/priv-app/SmallAppWidget-release
system/priv-app/SnpVUStore
system/priv-app/somc-get-to-know-it-release
system/priv-app/SomcPhotoAnalyzer
system/priv-app/sonyentrance2-release
system/priv-app/SoundPhotoCamera-xhdpi-release
system/priv-app/StylePortrait
system/priv-app/textinput-chn-xhdpi
system/priv-app/UpdateCenter-release
system/priv-app/usb-mtp-backup-transport
system/priv-app/usb-mtp-factoryreset-wrapper
system/priv-app/usb-mtp-fotaupdate-wrapper
system/priv-app/usb-mtp-update-wrapper
system/priv-app/usb-mtp-vendor-extension-service
system/priv-app/Velvet
LolaPalocz said:
As some people requested it, here are the script and the files list.
Probably best to use it just after flashtool and fastboot flash boot+twrp, before first boot, but can be run anytime, even multiple times if you want to debloat progressively by uncommenting some lines.
In TWRP : Advanced > Terminal, then cd /externalsd/, and execute :
sh debloat.sh debloat.sane dry to see what the script would do
sh debloat.sh debloat.sane to actually move the apks into /system/__Removed/.
Forgot to say in my first post that it also removes the whole content of /oem/deletable-app/ and /oem/priv-app/ .
Click to expand...
Click to collapse
Greetings,
the script works perfect!
Is it possible to make a script for the new firmware .224 ?
Thanks in advance.
greg.chalk said:
Is it possible to make a script for the new firmware .224 ?
Click to expand...
Click to collapse
Here it is (changes from .185 to .224 described at the beginning of the list file).
LolaPalocz said:
Here it is (changes from .185 to .224 described at the beginning of the list file).
Click to expand...
Click to collapse
That works nice on Z3+/Z4 with 224 FW
LolaPalocz said:
Here it is (changes from .185 to .224 described at the beginning of the list file).
Click to expand...
Click to collapse
Thank you very much for your effort
LolaPalocz said:
Here it is (changes from .185 to .224 described at the beginning of the list file).
Click to expand...
Click to collapse
After testing the script, everything works perfectly.
Just one last question: is it possible to disable or delete with the script "suggested apps"?
Also, maybe it's a good idea to make a new specific thread for this script so even more people be able to find it.
greg.chalk said:
Just one last question: is it possible to disable or delete with the script "suggested apps"?
Click to expand...
Click to collapse
If you mean the list of recent opened apps on the side of the drawer, it's part of the launcher (/system/app/home-release), and you don't want to remove the launcher : ) , so no.
(It would need hacking this package - there are other threads about modded sony home to install and replace this one - dunno if there is one with this removed).
greg.chalk said:
Also, maybe it's a good idea to make a new specific thread for this script so even more people be able to find it.
Click to expand...
Click to collapse
Well, I like it here : ) The real added value is the list of packages, sorted by importance and categories, with comments. So people can go edit it by hands and decide for themselves what they need. The script is just a side effect : )
Is it possible to make a script for the new firmware .253?
toncheee said:
Is it possible to make a script for the new firmware .253?
Click to expand...
Click to collapse
I wont have the time to check .253 soon.
But the script and the file list for .224 will most probably work with .253.
There was a few changes between .185 (Android 6.0) and .224 (Android 6.0.1), but as .253 is still Android 6.0.1, Sony may not have changed many .apk filenames, possibly none.
You may execute the script with the option "dry" to see what would be removed. If you see any line starting with "?" instead of "dry", the apk was not found and Sony may have renamed (or just removed) it. Please tell us.

persist.service.adb.enable=1 having trouble adding it into default.prop

persist.service.adb.enable=1 anytime i add it into the default prop and pack the boot image and try to test it it just hangs on the boot screen.. need some assistance in figuring out how to add persist.service.adb.enable=1 to the default prop in ramdisk.
CoffeeNAndroid said:
persist.service.adb.enable=1 anytime i add it into the default prop and pack the boot image and try to test it it just hangs on the boot screen.. need some assistance in figuring out how to add persist.service.adb.enable=1 to the default prop in ramdisk.
Click to expand...
Click to collapse
If you want to start adb on boot add adb to the USB config line , it will be similar to this :
persist.sys.usb.config =mtp,adb
messi2050 said:
If you want to start adb on boot add adb to the USB config line , it will be similar to this :
persist.sys.usb.config =mtp,adb
Click to expand...
Click to collapse
I added the adb and the persist.service.adb.enable=1 and got stuck on the boot screen. Maybe just persist.sys.usb.config =mtp,adb will do the trick.
CoffeeNAndroid said:
I added the adb and the persist.service.adb.enable=1 and got stuck on the boot screen. Maybe just persist.sys.usb.config =mtp,adb will do the trick.
Click to expand...
Click to collapse
Exactly
messi2050 said:
Exactly
Click to expand...
Click to collapse
That worked.. thanks.. booted right up..
CoffeeNAndroid said:
That worked.. thanks.. booted right up..
Click to expand...
Click to collapse
You are welcome
Im getting closer to my goal.. i got adb shell to work and the device to show up as a reconized device with adbd insecure cause the way it patches it makes the device as a attacted device even though the rsa fingerprint never asked you to allow the computer/laptop which is what is giving the unauthorized device errors and vendor keys not set. Thats why adb root access would only work with a custom recovery but now i see it works with adbd insecure and bypasses the rsa fingerprint. Ive got alot of testing to do..
Getting there slowly

Samsung Galaxy S7 boot on charge

The desired behavior is to boot the device (Samsung Galazy S7 with Android 7) when plugged on a power source. The solutions discussed in forums are summarized bellow:
Change the battery charging animation with a shell script which executes the reboot command
Use fastboot oem command (fastboot oem off-mode-charge enable/disable or similar command which is oem depended)
Modify the boot image by overriding the on charger event(s) so to "continue" booting or force the device to reboot
I started with the first solution: I replaced the /system/bin/lpm file with
Code:
#!/system/bin/sh
/system/bin/reboot
or using su
Code:
#!/system/bin/sh
su
/system/bin/reboot
The result of the approach was not successful. The device when plugged on a power source displays an empty battery image while the most important is the recovery of the original lpm file DOES not recover the original functionality (i.e. the phone still displays an empty battery image and the only way to boot it is using the combination of the recovery buttons)
The second solution was not applicable to the Samsung Galaxy S7 since the fastboot does not exist.
The third solution did not produce also the desired behavior. I got the boot image using dd and unpacked it using the unpackimg tool. I modified the file init.rc by changing the on charger event to:
Code:
on charger
class_start charger
class_stop charger
trigger late-init
or
Code:
on charger
class_start charger
class_stop charger
start boot-on-charge
service boot-on-charge /system/bin/reboot
class charger
user root
oneshot
or
Code:
on charger
class_start charger
setprop sys.boot_from_charger_mode 1
I also tried modifying some of the other init files which include the on charger event using the above approach without any success.
Has anyone tried the above solutions (or a different approach) on Samsung Galaxy S7 successfully?
So far, the only solution which works reliably is hacking the USB port of the Samsung device: If a resistor of about 304 KOhm (just slightly above 300KOhm) is connected between the ID pint and the Ground, the device boots in Download mode. After that, using the Odin or Heimdall tool the device can be rebooted normally. Although this is not the desired (I needed a software and more generic solution which could work with devices from other manufacturers) solution it is a workaround which is tested with S7, S5 and Note 4 and works!
lpm inode position
If a new lpm file with exactly the same content, permissions, ownership and modification time is created, then renamed, as lpm, it doesn't work.
Therefore, I think the inode position of the file is significant.
cat the contents of your script over the original lpm file, retaining it's inode position, then it appears to work.
Thanks floor51
Thank you very much floor51.
I work and surfing google about 3 month.
I have samsung galaxy note 4 and move lpm to lpm_org and cat lpm, but not work... did not boot when plug in.
Today, I read your content, and test.
Just #cat > lpm without #mv lpm lpm_org
Then It works !!!!! my phone boot when plug in.
Thanks very very much. ^^;;;
Bye.
floor51 said:
If a new lpm file with exactly the same content, permissions, ownership and modification time is created, then renamed, as lpm, it doesn't work.
Therefore, I think the inode position of the file is significant.
cat the contents of your script over the original lpm file, retaining it's inode position, then it appears to work.
Click to expand...
Click to collapse
cybodime said:
Thank you very much floor51.
I work and surfing google about 3 month.
I have samsung galaxy note 4 and move lpm to lpm_org and cat lpm, but not work... did not boot when plug in.
Today, I read your content, and test.
Just #cat > lpm without #mv lpm lpm_org
Then It works !!!!! my phone boot when plug in.
Thanks very very much. ^^;;;
Bye.
Click to expand...
Click to collapse
Thanks @cybodime for verifying the solution of @floor51. I didn't try the solution by myself since I am working on Samsung Galasy S8 now.
Best regards
Thanks for all suggestions, but I have run out of luck and ideas.
I have tried this on several ROM's on my Samsung Galaxy S7 Edge, latest a nice build from here: https://wccftech.com/install-fast-light-galaxy-s7-edge-rom/
All modifications of the /system/bin/lpm file, including the "cat >" results in a boot into recovery mode.
Any suggestions are highly appreciated!
Samsung J2 Pro
Did anyone find a solution for this.
I am getting the same issue - the phone reboots into recovery mode.
Sorry, nothing. I sort of gave up and will pick this up at a later stage..
AussieRoss said:
Did anyone find a solution for this.
I am getting the same issue - the phone reboots into recovery mode.
Click to expand...
Click to collapse
I have now build a ROM with Lineage 14.1 that boots up on charge power (USB).
Seems to be working fine on my S7 Edge
Solution for anyone who's interested.
https://android.stackexchange.com/questions/195146/lpm-reboot-samsung-galaxy-s7/206872#206872
Code:
#!/system/bin/sh
# Script to reboot the system as soon as the charger is inserted
# https://android.googlesource.com/kernel/common/+/android-trusty-3.10/Documentation/sysrq.txt
# Enable kernel commands.
su -c "echo 1 > /proc/sys/kernel/sysrq"
# Send an immediate reboot request.
echo b > /proc/sysrq-trigger
Backup and cat this script over the original lpm file and plugging in the charger will cause the phone to reboot to the system after a short delay.
Code:
echo /system/bin/lpm > /system/bin/lpm.bak
echo /sdcard/reboot_on_charge.sh > /system/bin/lpm
lrbj said:
I have now build a ROM with Lineage 14.1 that boots up on charge power (USB).
Seems to be working fine on my S7 Edge
Click to expand...
Click to collapse
Hi, How did you manage to change it? I now have a rom based on lineage.. so I would try and change the things you did to get it accomplished. did you change the battery animation file? or something else?
mouragio said:
Hi, How did you manage to change it? I now have a rom based on lineage.. so I would try and change the things you did to get it accomplished. did you change the battery animation file? or something else?
Click to expand...
Click to collapse
I located the healthd file: "android/system/system/core/healthd/healthd_mode_charger.cpp"
there you can find a log call stating: "starting charger mode"
just below I added a reboot command:
Code:
android_reboot(ANDROID_RB_RESTART, 0, 0);
Now my phone boots up on usb power
/Lars
lrbj said:
I located the healthd file: "android/system/system/core/healthd/healthd_mode_charger.cpp"
there you can find a log call stating: "starting charger mode"
just below I added a reboot command:
Code:
android_reboot(ANDROID_RB_RESTART, 0, 0);
Now my phone boots up on usb power
/Lars
Click to expand...
Click to collapse
Thanx Lars.. I am gonna try that one .
I post the results.
edit: unfortunatelly I dont have that file... thanx for your reaction tho .
Help with cat command please
Hi,
I've just aquired and rooted a galaxy tab SM-T800 for use in a car application and have been looking for the 'start when power is applied' solution. I'm ready to try this solution but am missing a bit of technical knowledge and I hope you can help...
I've installed termux and can get to the shell # through issuing the su command and granting super user permissions.
I have 2 questions.
1. Which version of the #!/system/bin/sh script works?
2. What command do I write in termux to overwrite the inode (not even sure what an inode is...)
Thanks in anticipation
cybodime said:
Thank you very much floor51.
I work and surfing google about 3 month.
I have samsung galaxy note 4 and move lpm to lpm_org and cat lpm, but not work... did not boot when plug in.
Today, I read your content, and test.
Just #cat > lpm without #mv lpm lpm_org
Then It works !!!!! my phone boot when plug in.
Thanks very very much. ^^;;;
Bye.
Click to expand...
Click to collapse
I resolved this with a bit more research.
I can confirm that using cat test_file > lpm solves the problem.
Things that I learned along the way are that it's worth while saving a copy of lpm so that you can always reinstate the original file if needed and that to successfully cat the text from the test_file into lpm it's necessary to temporarily make the /system directory writable with the command mount -o rw,remount /system and to set it back to read only by replacing rw with ro after the lpm file has been updated
Auto Boot on charger - Samsung Note 3 hlte
Sollace said:
Solution for anyone who's interested.
https://android.stackexchange.com/questions/195146/lpm-reboot-samsung-galaxy-s7/206872#206872
Code:
#!/system/bin/sh
# Script to reboot the system as soon as the charger is inserted
# https://android.googlesource.com/kernel/common/+/android-trusty-3.10/Documentation/sysrq.txt
# Enable kernel commands.
su -c "echo 1 > /proc/sys/kernel/sysrq"
# Send an immediate reboot request.
echo b > /proc/sysrq-trigger
Backup and cat this script over the original lpm file and plugging in the charger will cause the phone to reboot to the system after a short delay.
Code:
echo /system/bin/lpm > /system/bin/lpm.bak
echo /sdcard/reboot_on_charge.sh > /system/bin/lpm
Click to expand...
Click to collapse
Hello fellow XDA'ers/XDA'ites!
It's been a while since I've been active on the ROM improvement side but thought I'd offer my 2 cents. Straight to the point: The above method worked for me on my Samsung Galaxy Note 3 N9005 hlte, rooted, with TWRP recovery and Magisk, running MIUI 8. Using Root Explorer, I navigated to the root/system/bin folder, opened the lpm file, deleted the content and pasted the code above as advised, saved and exited (the text editor automatically backed up the original lpm file). I rebooted for good measure, powered down and when I connected the charger, phone boots up a few seconds after displaying the battery icon.
I'm hoping I can next figure out how to power the device without a battery (any ideas greatly welcomed - I've tried the Instructables tips and few others to no avail). I can then install the device into vehicle (FYI device fits quite nicely into Volvo 6.5" screen sat navs). For those interested in a bit of history on the different things I tried to reach this point, read on.
- I attempted the above with Lineage 14.1, 15.0 and 16.0, Resurrection Remixes (going down to v5.6.2) and could not find the lpm file to edit. I have not tried this with Stock but should it have the lpm file, it may be worth a try (if I have time I'll try it over the weekend).
- Editng the lpm file with the code did not work on my device
#!/system/bin/sh
/system/bin/reboot
- With great help from lrbj (see post 12 in this thread), I also attempted to cooking my own Lineage ROM, editing the healthd_mode_charger.cpp file located in the healthd file. Unfortunately, I got an error message during the the build process saying there were no dependancies in the file and at the line that was added (android_reboot(ANDROID_RB_RESTART, 0, 0).
I hope this helps anyone out there as I know I've received immense help from XDA and its members for over 10 years now (from my Winmo days). Cheers to all
Hi just playing with my old s7 edge,
I edited existing LPM file and just pasted the code
#! /system/bin/sh
Sleep 20
/system/bin/reboot
And it works. Dint have to change, anything at all
Just Pasted it at the end of existing stuff in that file.
I tried some fixes with my Samsung S8 plus but couldn't get the boot to work when the power is on.
But how is it possible that even with the original lpm file it doesn't work anymore?
I do not know what to do...
I can't figure out how to apply the cat commands ...
Can you help me?
lrbj said:
I located the healthd file: "android/system/system/core/healthd/healthd_mode_charger.cpp"
there you can find a log call stating: "starting charger mode"
just below I added a reboot command:
Code:
android_reboot(ANDROID_RB_RESTART, 0, 0);
Now my phone boots up on usb power
/Lars
Click to expand...
Click to collapse
Mybad how to find the file ? i dont have "Android/"

Categories

Resources