Showing posts with label binary. Show all posts
Showing posts with label binary. Show all posts

Sunday, 25 October 2015

Compile binary or cell radio on



Hello
I have problem with my sony xperia z2 i lost cell radio because radio is off... I don't now why but it is...
I try reinstal system many times reset all values and it don't work.. to time when i flash android 4.4..2 (or 4.4.4) and flash this i edit this flashable zip and this working but when i update to lolipop(5.1..1) radio is still off... i realize binary( radiooptions) for kitkat is difrent than lolipop. At this website is source code but i can't find compile binary to lolipop.. I be very happy if someone can compile radiooptions for lolipop or know how to repair this "bug" because after many attempt i don't now how:D

PS: All application to turn on cell radio don't work...
PS2: Sorry for my English...

code in case of...

Code:


/* //device/system/toolbox/resetradio.c
**
** Copyright 2006, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
**    http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <cutils/sockets.h>

#define SOCKET_NAME_RIL_DEBUG        "rild-debug"        /* from ril.cpp */
#define SOCKET_NAME_RIL2_DEBUG        "rild2-debug"

enum options {
    RADIO_RESET,
    RADIO_OFF,
    UNSOL_NETWORK_STATE_CHANGE,
    QXDM_ENABLE,
    QXDM_DISABLE,
    RADIO_ON,
    SETUP_PDP,
    DEACTIVATE_PDP,
    DIAL_CALL,
    ANSWER_CALL,
    END_CALL,
};


static void print_usage() {
    perror("Usage: radiooptions [option] [extra_socket_args]\n\
          0 - RADIO_RESET, \n\
          1 - RADIO_OFF, \n\
          2 - UNSOL_NETWORK_STATE_CHANGE, \n\
          3 - QXDM_ENABLE, \n\
          4 - QXDM_DISABLE, \n\
          5 - RADIO_ON, \n\
          6 apn- SETUP_PDP apn, \n\
          7 - DEACTIVE_PDP, \n\
          8 number - DIAL_CALL number, \n\
          9 - ANSWER_CALL, \n\
          10 - END_CALL \n\
          The argument before the last one must be SIM slot \n\
          0 - SIM1, \n\
          1 - SIM2, \n\
          2 - SIM3, \n\
          3 - SIM4, \n\
          The last argument must be modem-socket style \n\
          0 - one modem for one debug-socket, \n\
          1 - one modem for multiple debug socket \n");
}

static int error_check(int argc, char * argv[]) {
    if (argc < 2) {
        return -1;
    }
    const int option = atoi(argv[1]);
    if (option < 0 || option > 10) {
        return 0;
    } else if ((option == DIAL_CALL || option == SETUP_PDP) && argc == 5) {
        return 0;
    } else if ((option != DIAL_CALL && option != SETUP_PDP) && argc == 4) {
        return 0;
    }
    return -1;
}

static int get_number_args(char *argv[]) {
    const int option = atoi(argv[1]);
    if (option != DIAL_CALL && option != SETUP_PDP) {
        return 3;
    } else {
        return 4;
    }
}

int main(int argc, char *argv[])
{
    int fd;
    int num_socket_args = 0;
    int i  = 0;
    int modem_socket_type = 0;
    int sim_id = 0;
    char socket_name[20];

    if(error_check(argc, argv)) {
        print_usage();
        exit(-1);
    }

    num_socket_args = get_number_args(argv);
    modem_socket_type = atoi(argv[(num_socket_args-1)]);
    sim_id = atoi(argv[(num_socket_args-2)]);
    memset(socket_name, 0, sizeof(char)*20);
    if (sim_id == 0 || modem_socket_type == 1) {
        strncpy(socket_name, SOCKET_NAME_RIL_DEBUG, 19);
    } else if (sim_id == 1) {
        strncpy(socket_name, SOCKET_NAME_RIL2_DEBUG, 19);
    }
   
    fd = socket_local_client(socket_name,
                                ANDROID_SOCKET_NAMESPACE_RESERVED,
                                SOCK_STREAM);
    if (fd < 0) {
        perror ("opening radio debug socket");
        exit(-1);
    }

   
    /* It is not necessacry to pass the argument "modem-socket style" to rild */
    num_socket_args--;
    int ret = send(fd, (const void *)&num_socket_args, sizeof(int), 0);
    if(ret != sizeof(int)) {
        perror ("Socket write error when sending num args");
        close(fd);
        exit(-1);
    }

    for (i = 0; i < num_socket_args; i++) {
        // Send length of the arg, followed by the arg.
        int len = strlen(argv[1 + i]);
        ret = send(fd, &len, sizeof(int), 0);
        if (ret != sizeof(int)) {
            perror("Socket write Error: when sending arg length");
            close(fd);
            exit(-1);
        }
        ret = send(fd, argv[1 + i], sizeof(char) * len, 0);
        if (ret != len * sizeof(char)) {
            perror ("Socket write Error: When sending arg");
            close(fd);
            exit(-1);
        }
    }

    close(fd);
    return 0;
}





Saturday, 24 October 2015

Note 5 after root No boot KERNEL IS NOT SEANDROID ENFORCING Custom binary blocked by



Hi
i was using Note 5 N920C with 5.1.1 Smoothly.i just rooted phone with SpaceX-Kernel-v0.1 Successfully after i put my google and samsung account after Restart phone i am getting this MSG KERNEL IS NOT SEANDROID ENFORCING
Custom binary blocked by FRP Lock.
then power off.
i still able to enter in DLM and Recovery Mode i wiped my data from recovery cashe but still same.
i also tried to install stock Rom but its Failed

plz advise me what should i do now


Thanks



Need Help with FRP binary lock



Flashed the Moar rom and all was working fine until I turned on the OEM Unlocked and then rebooted the next day.
Now I all I can get is the download mode. Tried flashing the rom, TWRP, Stock tar rom with Odin. And get nothing but failed. Called Sammy customer support and all they would say is they don't support custom roms. I am downloading Kies 3 to see that will work. So whatever you do, don't turn off the OEM Unlock or you are screwed.
Unless someone can help it looks like I will have pay full price for a new phone.



Friday, 23 October 2015

SW REV Check Failed device 3 binary 2 and sboot HELP



I tried to ROOT my phone and now its bricked. I can get to TWRP and reboot but it does nothing it just loops. I really need help. Thank you if advance.



Thursday, 22 October 2015

E:error executing updater binary in zip-...



i ve tried with cm and pacman roms and i can t install it , i didn made a backup , when i reboot to recovery trwp ask me if i want to root , but i have alredy rooted, i swipe to root it and my phone restarts without doing anithing , i need help
moto g 2gen 4 g thea