Damp the LG G3 Thermal Throttling

As our mobile devices grow thinner and more powerfulwith each passing generation, it’s inevitable … more

Google Play Developer Distribution Agreement Due Tomorrow

Every once in a while, Google updates theGoogle PlayDeveloper Distribution … more

LG to Release Octa-Core “Nuclun” SoC in the LG G3 Screen

LG is set to follow the likes of Samsung and other manufacture its own … more

Lockdown Pro 2 Brings Material Design and Media Support

Back in March of this year, we took a look at a rather innovated security application … more
Post Reply

[KERNEL][STOCK][4.4.2] Only Adb Insecure

OP _AtilA_

16th January 2014, 09:01 AM   |  #1  
OP Junior Member
Thanks Meter: 52
 
25 posts
Join Date:Joined: Jul 2011
Hi there!
I needed adbd to always run as root in order to push/pull files, but I wanted to stick as close as possible to stock, so I just modified the production boot.img with a patched version of adbd that enforces it to always run as root. I used a boot.img for Android 4.4.2 extracted from the factory images [1] provided by Google.
I thought that it could be usefull to somebody else so... here you have.

It comes in two flavors:

CWM installable .zip [2]
boot.img for fastboot[/URL] [3]


LINKS
[1] Google Factory Images : https://developers.google.com/androi...=es#hammerhead
[2] CWM Installable .zip : https://mega.co.nz/#!lJVxWCaA!QA4Zo0...QCuIzuYFN bnFU
[3] boot.img : https://mega.co.nz/#!sYE0xDZL!PpR1Gz...Sdsee4mGF d5PA


Enjoy!!

XDA:DevDB Information
[KERNEL][STOCK][4.4.2] Only Adb Insecure, a Kernel for the Google Nexus 5

Contributors
_AtilA_
Kernel Special Features: Stock kernel, but with adbd running always as root, so you can adb push/pull/remount/shell/etc as root

Version Information
Status: Stable

Created 2014-01-16
Last Updated 2014-01-16
The Following 10 Users Say Thank You to _AtilA_ For This Useful Post: [ View ]
16th January 2014, 06:35 PM   |  #2  
Senior Member
Flag Maassluis
Thanks Meter: 25
 
132 posts
Join Date:Joined: Apr 2012
More
Err would be nice if we could auto patch a boot.img from other custom kernels ^^
17th January 2014, 08:44 AM   |  #3  
OP Junior Member
Thanks Meter: 52
 
25 posts
Join Date:Joined: Jul 2011
Quote:
Originally Posted by BRiANj64

Err would be nice if we could auto patch a boot.img from other custom kernels ^^

Not really sure about what you mean... Basically, the only change I made is a patched adbd. So, the only thing that other custom kernels have to do, is replace the binary. I can provide you a link with the binary, but it's quite easy to extract it from the boot.img
I you want to know exactly what I've changed in the adb.c, here it is:
Code:
static int should_drop_privileges() {
#ifndef ALLOW_ADBD_ROOT
    return 1;
#else /* ALLOW_ADBD_ROOT */
    int secure = 0;
    char value[PROPERTY_VALUE_MAX];

   /* run adbd in secure mode if ro.secure is set and
    ** we are not in the emulator
    */
#if 0 /* <JGM> No privileges drop! */
    property_get("ro.kernel.qemu", value, "");
    if (strcmp(value, "1") != 0) {
        property_get("ro.secure", value, "1");
        if (strcmp(value, "1") == 0) {
            // don't run as root if ro.secure is set...
            secure = 1;

            // ... except we allow running as root in userdebug builds if the
            // service.adb.root property has been set by the "adb root" command
            property_get("ro.debuggable", value, "");
            if (strcmp(value, "1") == 0) {
                property_get("service.adb.root", value, "");
                if (strcmp(value, "1") == 0) {
                    secure = 0;
                }
            }
        }
    }
#endif
    return secure;
#endif /* ALLOW_ADBD_ROOT */
}
Simple, disable privilege drop logic and return the correct value.
17th January 2014, 10:07 AM   |  #4  
P.Mobile's Avatar
Senior Member
Flag RhOdE IsLAnD... 401
Thanks Meter: 935
 
4,336 posts
Join Date:Joined: Nov 2011
More
can we flash using twrp recovery?? i think most people use twrp
19th January 2014, 09:13 PM   |  #5  
OP Junior Member
Thanks Meter: 52
 
25 posts
Join Date:Joined: Jul 2011
Quote:
Originally Posted by P.Mobile

can we flash using twrp recovery?? i think most people use twrp

I don't really know! I've never used TWRP, maybe someone could tell us if CWM .zip file is compatible with the TWRP installation system
23rd January 2014, 10:16 PM   |  #6  
jumparound246's Avatar
Senior Member
Thanks Meter: 316
 
719 posts
Join Date:Joined: Oct 2012
Quote:
Originally Posted by _AtilA_

I don't really know! I've never used TWRP, maybe someone could tell us if CWM .zip file is compatible with the TWRP installation system

Yup

Sent from my Nexus 5 using Tapatalk

---------- Post added at 11:16 PM ---------- Previous post was at 11:14 PM ----------



Can't imagine why all the guys are using custom kernels...:what:

Sent from my Nexus 5 using Tapatalk
27th February 2014, 01:46 PM   |  #7  
Senior Member
Thanks Meter: 12
 
105 posts
Join Date:Joined: Oct 2011
Quote:
Originally Posted by _AtilA_

Hi there!
I needed adbd to always run as root in order to push/pull files, but I wanted to stick as close as possible to stock, so I just modified the production boot.img with a patched version of adbd that enforces it to always run as root. I used a boot.img for Android 4.4.2 extracted from the factory images [1] provided by Google.
I thought that it could be usefull to somebody else so... here you have.

It comes in two flavors:

CWM installable .zip [2]
boot.img for fastboot[/URL] [3]


LINKS
[1] Google Factory Images : https://developers.google.com/androi...=es#hammerhead
[2] CWM Installable .zip : https://mega.co.nz/#!lJVxWCaA!QA4Zo0...QCuIzuYFN bnFU
[3] boot.img : https://mega.co.nz/#!sYE0xDZL!PpR1Gz...Sdsee4mGF d5PA


Enjoy!!

XDA:DevDB Information
[KERNEL][STOCK][4.4.2] Only Adb Insecure, a Kernel for the Google Nexus 5

Contributors
_AtilA_
Kernel Special Features: Stock kernel, but with adbd running always as root, so you can adb push/pull/remount/shell/etc as root

Version Information
Status: Stable

Created 2014-01-16
Last Updated 2014-01-16

FWIW: The MEGA link does not work natively with the MEGA App if you attempt to download directly from your N5. The link is
Code:
https://mega.co.nz/#!lJVxWCaA!QA4Zo04_bnzxEjmHDyjUDl9cFiAjJ5QCuIzuYFNbnFU
The Following User Says Thank You to cliff p For This Useful Post: [ View ]
10th June 2014, 12:05 AM   |  #8  
Member
Thanks Meter: 50
 
75 posts
Join Date:Joined: May 2010
Quote:
Originally Posted by _AtilA_

I thought that it could be usefull to somebody else so... here you have.

This insecure boot works good for stock 4.4.3.
remount... delele... etc... by adb.

Thank you.

The Following User Says Thank You to osebee For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Nexus 5 Android Development by ThreadRank