persist.service.adb.enable=1 having trouble adding it into default.prop - Samsung Galaxy J7 Questions & Answers

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

Related

[Q] ADB problem

I switched to a 2.3.3 based rom today, and now adb won't allow me to remount or push. I can pull just fine. But if I type adb remount, I get the error, "remount failed: operation not permitted."
If I boot into CWM and mount /system or /data, I can remount, push, or pull with adb with no problems. But once I boot into the rom, all I can do is pull.
I am using a rooted rom with the latest superuser and busybox.
Anyone have any ideas?
Still really needing some help with this, please.
If you type adb shell, do you get a $ or a #?
Try opening the SuperUser app on your phone then doing adb remount.
Sent from my LG-P999 using XDA App
mmapcpro said:
I switched to a 2.3.3 based rom today, and now adb won't allow me to remount or push. I can pull just fine. But if I type adb remount, I get the error, "remount failed: operation not permitted."
If I boot into CWM and mount /system or /data, I can remount, push, or pull with adb with no problems. But once I boot into the rom, all I can do is pull.
I am using a rooted rom with the latest superuser and busybox.
Anyone have any ideas?
Click to expand...
Click to collapse
Look at the default.prop file on the root of your device. I bet that there's a line that says: "ro.secure=1".
For whatever reason, the maker of your ROM set ro.secure to be on, which limits a lot of what you can do via adb. No pushing to /system, no remounting in rw mode. This is part of the boot.img file in the ROM, and is set with every reboot. Ask the maker of the ROM to set ro.secure to 0.
I had this problem with EaglesBlood Froyo until I *****ed enough that the dev changed it on the next release.
Try typing in adb remount then adb push your files.
Sent from my LG-P999
mstrk242 said:
Try typing in adb remount then adb push your files.
Sent from my LG-P999
Click to expand...
Click to collapse
Ah, he says in the first post that he tries that but gets an error.
Still having the issue.
I searched through default.prop and ro.secure=0.
I also attempted to adb remount while running superuser, with no success.
I am on EB1.08 for 2.3.3 currently, but I also tested this on Weapon G2x 2.3.3 with the same results.
mmapcpro said:
Still having the issue.
I searched through build.prop and there is no ro.secure line at all...not set to 1, not set to 0...not there.
I also attempted to adb remount while running superuser, with no success.
I am on EB1.08 for 2.3.3 currently, but I also tested this on Weapon G2x 2.3.3 with the same results.
Click to expand...
Click to collapse
Not build.prop, but *default.prop*, should only be a few lines long, in the root of your phone's filesystem:
adb shell
ls
you should see the file. Mine looks like (minus the -----):
----------------------------------
#
# ADDITIONAL_DEFAULT_PROPERTIES
#
ro.secure=0
ro.allow.mock.location=1
ro.debuggable=1
persist.service.adb.enable=1
ro.serialno=******* (censored by me)
----------------------------------
wewoapsiak said:
If you type adb shell, do you get a $ or a #?
Try opening the SuperUser app on your phone then doing adb remount.
Sent from my LG-P999 using XDA App
Click to expand...
Click to collapse
when I type "adb shell", it displays: sh-3.2$
lannister80 said:
Not build.prop, but *default.prop*, should only be a few lines long, in the root of your phone's filesystem:
adb shell
ls
you should see the file. Mine looks like (minus the -----):
----------------------------------
#
# ADDITIONAL_DEFAULT_PROPERTIES
#
ro.secure=0
ro.allow.mock.location=1
ro.debuggable=1
persist.service.adb.enable=1
ro.serialno=******* (censored by me)
----------------------------------
Click to expand...
Click to collapse
Yeh, I went back and edited my post because I re-read your response and realized I was looking at the wrong file...but default.prop says ro.secure=0
mmapcpro said:
Yeh, I went back and edited my post because I re-read your response and realized I was looking at the wrong file...but default.prop says ro.secure=0
Click to expand...
Click to collapse
Well crap, scratch that idea. But the behavior you describe is exactly what happened when ro.secure=1 was set in EB Froyo, so it must be something...similar?
Problem with ROM!
Sorry for the late reply, but this seems close to the answer.You must be using a custom ROM not Stock GingerBread ,right? Well, some initialisation script(files like init.rc) are responsible for setting the state of adb daemon at boot time. There scripts normally check files like build.prop, default.prop,local.prop, environment variables and stuff like that and accordingly setup many features like heapsize, display mode, adb secure or insecure,etc. There should be something different with your ROM's initialization scripts.
Oh, and i forgot! You can't change default.prop like that. Every time you reboot, default.prop'll be reloaded from boot partition image, effectively undoing any changes you made. Flashing a better boot.img may solve the problem.

[Q] How to add adb on roms?

How to add ADB on roms?
It doesn't work for the moment...
Are you asking how to add adb to a new rom your making?
Or that there is a rom without adb? If so, which one? All roms IMO have adb (enable USB debugging)
Hit Thanks if I helped you!
New rom i'm making
ok I've found. People who need, just add
Code:
persist.sys.usb.config=mtp,adb
LoveForEver said:
ok I've found. People who need, just add
Code:
persist.sys.usb.config=mtp,adb
Click to expand...
Click to collapse
ADB comes as default and a Google of that line shows it isn't for enabling it.

[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!

Auto Boot / Start on charge (different devices)

Hello all,
i would like to buy a new (cheap) tablet which i can modify to auto boot / start on charge. I need this for an project. I plan to use this tablet as a mediaplayer in my new bathroom and the buttons of this tablet will not be reachable. Is it possible to modify every device to auto boot on charge or has someone experience with devices not working?
Thx and greetings
gigi
Sorry OP
i want to hijack this thread to to compile all successful method for different devices to autoboot when plug in /charging
any one to do this must root their device and use AIK to decompile/recompile boot.image, modify certain file depending on the device
---------- Post added at 05:35 PM ---------- Previous post was at 05:23 PM ----------
]REDMI 6A MTK Device
need to modify kopc_charger file
here
https://forum.xda-developers.com/showpost.php?p=81874791&postcount=158
https://forum.xda-developers.com/showpost.php?p=81880927&postcount=159
---------- Post added at 05:45 PM ---------- Previous post was at 05:35 PM ----------
On I9500 runing linage OS 16
modify the init.rc
on charger
setprop ro.bootmode "normal"
setprop sys.powerctl "reboot"
---------- Post added at 06:03 PM ---------- Previous post was at 05:45 PM ----------
Redmi 4x
modify init.rc
on charger
class_start charger
class_stop charger
on property:sys.boot_from_charger_mode=1
trigger late-init
Samsung S5 (klte)
Working Roms: lineage-15.1
stock 6
modify init.rc:
on charger
setprop ro.bootmode "normal"
setprop sys.powerctl "reboot"
tried the same with samsung s3 mini (kminilte) but not working
HI there, i have installed this Rom to my samsung s8, it is pretty cool, and i am trying to set auto boot on USB power pluggin, but until now, no luck.
Since Android 10, seems the init.rc is regenerated every time when it boots, so unpack/repack of the .img solution seems not working any more. what i am trying next is via magisk module, still in process but no progress.
Is there any other way to do this? any light would be appreciated.
tonyniu2008 said:
HI there, i have installed this Rom to my samsung s8, it is pretty cool, and i am trying to set auto boot on USB power pluggin, but until now, no luck.
Since Android 10, seems the init.rc is regenerated every time when it boots, so unpack/repack of the .img solution seems not working any more. what i am trying next is via magisk module, still in process but no progress.
Is there any other way to do this? any light would be appreciated.
Click to expand...
Click to collapse
The init.rc is unpacked from the boot partition, you see in / only a copy of init.rc
What other solutions did you try to make it boot instantly?
hisoka_simp said:
The init.rc is unpacked from the boot partition, you see in / only a copy of init.rc
What other solutions did you try to make it boot instantly?
Click to expand...
Click to collapse
I tried to unpack the boot image, and actually the init.rc is missing from the root path, i googled it, as i think it caused by the system version, starting from Android 10, init.rc will be only generated when booting, my system is LineageOS 17.1
when the system finishing booting, i can adb shell to the file, init.rc is there then, i tried to unpack the recovery image, the init.rc is there, i tried to change that and flash to boot, and recovery, no luck, after booting the init.rc still keep the same as before.
I am currently trying the magisk module, but not yet a solution.
As you said the init.rc is copyed from somewhere, do you know where?
tonyniu2008 said:
I tried to unpack the boot image, and actually the init.rc is missing from the root path, i googled it, as i think it caused by the system version, starting from Android 10, init.rc will be only generated when booting, my system is LineageOS 17.1
when the system finishing booting, i can adb shell to the file, init.rc is there then, i tried to unpack the recovery image, the init.rc is there, i tried to change that and flash to boot, and recovery, no luck, after booting the init.rc still keep the same as before.
I am currently trying the magisk module, but not yet a solution.
As you said the init.rc is copyed from somewhere, do you know where?
Click to expand...
Click to collapse
Can you send me a link (google drive would be nice) to an unmodified version of your boot.img? I'll modify it correctly and send back to you
hisoka_simp said:
Can you send me a link (google drive would be nice) to an unmodified version of your boot.img? I'll modify it correctly and send back to you
Click to expand...
Click to collapse
It is so kind of you, you can find my TWRP backup image here: https://drive.google.com/file/d/1dtdovnRIZY58SYqFBNEgT4TafktmAycd/view?usp=sharing
just have a clean backup there. but as i unpacked, there is no init.rc under root, hope you know a way for this.
Let me know if you found something, thx
hisoka_simp said:
Can you send me a link (google drive would be nice) to an unmodified version of your boot.img? I'll modify it correctly and send back to you
Click to expand...
Click to collapse
The content of ramdisk is extracted from the boot partition every time it starts, so modifying init.rc does not work.
I extracted my boot partition to boot.img, then unpacked it, modified the init.rc inside, repackaged it as boot.img, and finally flashed into the boot partition
After the system started, I saw that the init.rc was modified
But it’s not pungent and has no effect
on charger
class_start charger
setprop sys.powerctl reboot
My device is huawei MediaPad3,maybe your device can work。Try it
tonyniu2008 said:
I tried to unpack the boot image, and actually the init.rc is missing from the root path, i googled it, as i think it caused by the system version, starting from Android 10, init.rc will be only generated when booting, my system is LineageOS 17.1
when the system finishing booting, i can adb shell to the file, init.rc is there then, i tried to unpack the recovery image, the init.rc is there, i tried to change that and flash to boot, and recovery, no luck, after booting the init.rc still keep the same as before.
I am currently trying the magisk module, but not yet a solution.
As you said the init.rc is copyed from somewhere, do you know where?
Click to expand...
Click to collapse
The content of ramdisk is extracted from the boot partition every time it starts, so modifying init.rc does not work.
I extracted boot partition to boot.img, then unpacked it, modified the init.rc , repackaged it as boot.img, and finally flashed into the boot partition
After the system started, I saw that the init.rc was modified
But it’s no effect
on charger
class_start charger
setprop sys.powerctl reboot
My device is huawei MediaPad3,maybe your device can work。Try it
bearllm said:
The content of ramdisk is extracted from the boot partition every time it starts, so modifying init.rc does not work.
I extracted boot partition to boot.img, then unpacked it, modified the init.rc , repackaged it as boot.img, and finally flashed into the boot partition
After the system started, I saw that the init.rc was modified
But it’s no effect
on charger
class_start charger
setprop sys.powerctl reboot
My device is huawei MediaPad3,maybe your device can work。Try it
Click to expand...
Click to collapse
Hey I recommend you to also try this code which worked for another device I had, hope it works
on charger
setprop ro.bootmode "normal"
setprop sys.powerctl "reboot"
hisoka_simp said:
Hey I recommend you to also try this code which worked for another device I had, hope it works
on charger
setprop ro.bootmode "normal"
setprop sys.powerctl "reboot"
Click to expand...
Click to collapse
Thanks,I tried it last night,It does not work : (
I think Huawei’s program entry is not here
BTW,i use the APP "Tasker",my device can automatically shut down when the usb line is unplugged
hisoka_simp said:
Hey I recommend you to also try this code which worked for another device I had, hope it works
on charger
setprop ro.bootmode "normal"
setprop sys.powerctl "reboot"
Click to expand...
Click to collapse
I think i did it
in the "init.charger.rc"
on charger
chmod 0440 /sys/class/hw_power/battery/isc
chown system system /sys/class/hw_power/battery/isc
trigger cust_parse_action
class_start charger
wait /dev/block/bootdevice/by-name/oeminfo
start oeminfo_nvm
start teecd
change to
on charger
chmod 0440 /sys/class/hw_power/battery/isc
chown system system /sys/class/hw_power/battery/isc
trigger cust_parse_action
class_start charger
setprop ro.bootmode "normal"
setprop sys.powerctl "reboot"
wait /dev/block/bootdevice/by-name/oeminfo
start oeminfo_nvm
start teecd
the new problem is coming
when i flash the repacked into my device,i can't enter developer options
I tried not to make any changes, just package boot.img with the unpacked file, the same situation
but i flash the boot.img from my boot partition,everything is ok
You
bearllm said:
I think i did it
in the "init.charger.rc"
on charger
chmod 0440 /sys/class/hw_power/battery/isc
chown system system /sys/class/hw_power/battery/isc
trigger cust_parse_action
class_start charger
wait /dev/block/bootdevice/by-name/oeminfo
start oeminfo_nvm
start teecd
change to
on charger
chmod 0440 /sys/class/hw_power/battery/isc
chown system system /sys/class/hw_power/battery/isc
trigger cust_parse_action
class_start charger
setprop ro.bootmode "normal"
setprop sys.powerctl "reboot"
wait /dev/block/bootdevice/by-name/oeminfo
start oeminfo_nvm
start teecd
the new problem is coming
when i flash the repacked into my device,i can't enter developer options
I tried not to make any changes, just package boot.img with the unpacked file, the same situation
but i flash the boot.img from my boot partition,everything is ok
Click to expand...
Click to collapse
I removed the whole code in the on charger block and pasted just mine so in the block is ONLY those 2 commands.
This maybe results in an error bc charger class is started but not properly shutdown.
Another error could be the file, idk if there is a global init.rc in your boot.img if yes then search in there for on charger bc the global init.rc is called at first and only after that the others so maybe look if there is an on charger block in the unpacked boot img in the init.rc
But I don't know why you can't access the developer options anymore, it would help me to do if you explain a bit more detailed what's going on when you try to open them
hisoka_simp said:
You
I removed the whole code in the on charger block and pasted just mine so in the block is ONLY those 2 commands.
This maybe results in an error bc charger class is started but not properly shutdown.
Another error could be the file, idk if there is a global init.rc in your boot.img if yes then search in there for on charger bc the global init.rc is called at first and only after that the others so maybe look if there is an on charger block in the unpacked boot img in the init.rc
But I don't know why you can't access the developer options anymore, it would help me to do if you explain a bit more detailed what's going on when you try to open them
Click to expand...
Click to collapse
ok
this is my test
step1
I extracted boot.img from the boot partition.
step2
unpack boot.img to the folder “unpacked_img”
step3
repacked the folder “unpacked_img” to the RepackBoot.img (Did not change any files in the folder, just repacked)
step4
flah the RepackBoot.img to the boot partition
i can't access the developer options anymore
but i flash the boot.img(step1) to the boot partition
i can access the developer options again
think you so much
bearllm said:
ok
this is my test
step1
I extracted boot.img from the boot partition.
step2
unpack boot.img to the folder “unpacked_img”
step3
repacked the folder “unpacked_img” to the RepackBoot.img (Did not change any files in the folder, just repacked)
step4
flah the RepackBoot.img to the boot partition
i can't access the developer options anymore
but i flash the boot.img(step1) to the boot partition
i can access the developer options again
think you so much
Click to expand...
Click to collapse
bearllm said:
ok
this is my test
step1
I extracted boot.img from the boot partition.
step2
unpack boot.img to the folder “unpacked_img”
step3
repacked the folder “unpacked_img” to the RepackBoot.img (Did not change any files in the folder, just repacked)
step4
flah the RepackBoot.img to the boot partition
i can't access the developer options anymore
but i flash the boot.img(step1) to the boot partition
i can access the developer options again
think you so much
Click to expand...
Click to collapse
Did you try to unlock developer options again? (Tapping build number 10x)
hisoka_simp said:
Did you try to unlock developer options again? (Tapping build number 10x)
Click to expand...
Click to collapse
I have tried, failed~~~~~~~
and i reset pad to factory settings, do not open the developer options first,flash the RepackBoot.img
unlock developer options after reboot
the situation is still the samet,can't access the developer options
my heart is broken,hahaha
bearllm said:
I have tried, failed~~~~~~~
and i reset pad to factory settings, do not open the developer options first,flash the RepackBoot.img
unlock developer options after reboot
the situation is still the samet,can't access the developer options
my heart is broken,hahaha
Click to expand...
Click to collapse
What do you mean exactly you can't access? Is the toast not showing which says you unlocked developer options or do you try to open them and settings crash then?
hisoka_simp said:
What do you mean exactly you can't access? Is the toast not showing which says you unlocked developer options or do you try to open them and settings crash then?
Click to expand...
Click to collapse
i can unlocked developer options ,but when i click the "developer options ",the program crashes
hello.
one year ago, i can modify my xiaomi mix2s with xiaomi.eu rom. and the phone boots when the charger is connected. The modification i make power the phone, apears the chargin animation and after a second, the phone reboots and launch android.
The problem is, i must factory reset the phone and now, this not works, and i must do the trick again. but i dont remember what i did!!!!
somebody know how to modify the phone to boot when charger is connected??

Enable ADB-ROOT from shell ?

Is it possible to enable root debugging from the command line. The rom that I'm using is missing the setting in developers options. When trying adb root I get the
Code:
ADB Root access is disabled by system setting - enable in Settings -> System -> Developer options
I don't believe it's totally disabled because I don't get the "adb root is not allowed in production builds". I think it's there but no switch to toggle. Haven't found anything searching for setting name and would need correct value and table if it can be set. Anybody know how to toggle it on from shell ?
Command adb root works in development builds only ( i.e. eng and userdebug which have ro.debuggable=1 by default ). So to enable the adb root command on your otherwise rooted device just add the ro.debuggable=1 line to /system/build.prop file.
If you want adb shell to start as root by default - then add ro.secure=0 as well.
jwoegerbauer said:
Command adb root works in development builds only ( i.e. eng and userdebug which have ro.debuggable=1 by default ). So to enable the adb root command on your otherwise rooted device just add the ro.debuggable=1 line to /system/build.prop file.
If you want adb shell to start as root by default - then add ro.secure=0 as well.
Click to expand...
Click to collapse
Thanks, actually looking into it, I don't know what to think about it. It is a user build of crdroid. I can not and absolutely do not understand the point of building a user build to post on XDA. The fact that someone is installing a custom rom kinda throws a user build out the window AFAIFC. It didn't even dawn on me to check if it was userdebug or not, in my mind, of course it is. That's what I get for thinking I guess. I like CrDroid so syncing source now, time to sync and build I should have an eng build in about 3 hours.
Take note that if adbd in your phone's firmware is build without ALLOW_ADBD_ROOT then you're wasting your time.

Categories

Resources