Showing posts with label compile. Show all posts
Showing posts with label compile. 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

Cyanogenmod 12.1 compile error(s)



Well i'm actually trying to build cm 12.1 for the i9000, the build is almost done but i'm getting this error when creating the ota package. Could any dev help me to solve it ?

Here is the log:

Code:


Package OTA: /home/xx/android/system/out/target/product/galaxysmtd/cm_galaxysmtd-ota-9e04b1eeb2.zip
unzipping target target-files...
  running:  unzip -o -q /home/xx/android/system/out/target/product/galaxysmtd/obj/PACKAGING/target_files_intermediates/cm_galaxysmtd-target_files-9e04b1eeb2.zip -d /tmp/targetfiles-a5oeYc
Warning: could not find RECOVERY/RAMDISK/etc/recovery.fstab
--- target info ---
blockimgdiff_versions    = (str) 1,2,3
blocksize                = (int) 4096
boot_size                = (int) 7864320
build.prop                = (dict) {'ro.setupwizard.enterprise_mode': '1', 'ro.product.cpu.abilist': 'armeabi-v7a,armeabi', 'ro.url.legal': 'http://www.google.com/intl/%s/mobile/android/basic/phone-legal.html', 'ro.build.product': 'GT-I9000', 'ro.build.id': 'LMY48W', 'ro.build.version.sdk': '22', 'ro.product.cpu.abilist32': 'armeabi-v7a,armeabi', 'ro.sys.fw.bg_apps_limit': '16', 'dalvik.vm.isa.arm.features': 'default', 'ro.bq.gpu_to_cpu_unsupported': '1', 'ro.ksm.default': '1', 'dalvik.vm.heapmaxfree': '2m', 'ro.build.fingerprint': 'samsung/GT-I9000/GT-I9000:2.3.5/GINGERBREAD/XXJVT:user/release-keys', 'ro.product.manufacturer': 'samsung', 'mobiledata.interfaces': 'pdp0,eth0,gprs,ppp0', 'ro.telephony.ril_class': 'SamsungExynos3RIL', 'camera2.port.operation_time_ms': '5000', 'dalvik.vm.heapstartsize': '5m', 'ro.config.max_starting_bg': '10', 'ro.product.brand': 'samsung', 'wifi.interface': 'wlan0', 'ro.com.google.networklocation': '1', 'ro.cm.version': '12.1-20151024-UNOFFICIAL-galaxysmtd', 'ro.cm.build.version.plat.sdk': '3', 'dalvik.vm.dex2oat-filter': 'interpret-only', 'ro.product.model': 'GT-I9000', 'dalvik.vm.dexopt-data-only': '1', 'ro.cmlegal.url': 'https://cyngn.com/legal/privacy-policy', 'dalvik.vm.heapsize': '128m', 'dalvik.vm.dex2oat-Xmx': '96m', 'ro.url.legal.android_privacy': 'http://www.google.com/intl/%s/mobile/android/basic/privacy.html', 'dalvik.vm.dex2oat-Xms': '8m', 'dalvik.vm.heaptargetutilization': '0.75', 'ro.com.google.locationfeatures': '1', 'dalvik.vm.image-dex2oat-Xms': '48m', 'ro.build.host': 'guillaume-K53SV', 'ro.com.android.dataroaming': 'false', 'ro.build.version.security_patch': '2015-10-01', 'media.sf.extractor-plugin': 'libffmpeg_extractor.so', 'dalvik.vm.heapminfree': '512k', 'dalvik.vm.image-dex2oat-Xmx': '48m', 'ro.build.version.base_os': '', 'ro.ril.hsxpa': '1', 'ro.board.platform': 's5pc110', 'ro.product.cpu.abilist64': '', 'ro.additionalmounts': '/storage/sdcard1', 'ro.ril.enable.managed.roaming': '1', 'ro.build.flavor': 'cm_galaxysmtd-userdebug', 'rild.libargs': '-d /dev/ttyS0', 'ro.build.version.release': '5.1.1', 'ro.build.version.codename': 'REL', 'net.bt.name': 'Android', 'ro.build.type': 'userdebug', 'ro.config.alarm_alert': 'Helium.ogg', 'ro.opengles.version': '131072', 'ro.build.display.id': 'cm_galaxysmtd-userdebug 5.1.1 LMY48W e886cea11d test-keys', 'ro.rommanager.developerid': 'cyanogenmod', 'ro.config.ringtone': 'Orion.ogg', 'dalvik.vm.dexopt-flags': 'm=y', 'ro.telephony.ril.config': 'icccardstatus,datacall,signalstrength,facilitylock', 'dalvik.vm.stack-trace-file': '/data/anr/traces.txt', 'ro.carrier': 'unknown', 'ro.product.board': 'aries', 'ro.com.google.clientidbase': 'android-google', 'ro.cm.build.version.plat.rev': '0', 'ro.build.date': 'samedi 24 octobre 2015, 11:29:06 (UTC+0200)', 'ro.kernel.android.checkjni': '0', 'ro.build.date.utc': '1445678946', 'keyguard.no_require_sim': 'true', 'ro.build.version.all_codenames': 'REL', 'dalvik.vm.lockprof.threshold': '500', 'ro.build.selinux': '1', 'persist.sys.root_access': '0', 'persist.sys.dalvik.vm.lib.2': 'libart.so', 'ro.product.cpu.abi': 'armeabi-v7a', 'camera2.portability.force_api': '1', 'debug.hwui.render_dirty_regions': 'false', 'ro.com.android.wifi-watchlist': 'GoogleGuest', 'ro.product.name': 'GT-I9000', 'ro.config.low_ram': 'true', 'rild.libpath': '/system/lib/libsec-ril.so', 'media.sf.omx-plugin': 'libffmpeg_omx.so', 'ro.ril.gprsclass': '10', 'ro.wifi.channels': '', 'ro.modversion': '12.1-20151024-UNOFFICIAL-galaxysmtd', 'ro.build.characteristics': 'default', 'ro.hwui.disable_scissor_opt': 'true', 'ro.build.version.incremental': 'e886cea11d', 'ro.phone_storage': '1', 'ro.build.tags': 'test-keys', 'dalvik.vm.image-dex2oat-filter': 'speed', 'ro.sf.lcd_density': '240', 'ro.com.android.dateformat': 'MM-dd-yyyy', 'ro.cm.releasetype': 'UNOFFICIAL', 'ro.product.cpu.abi2': 'armeabi', 'ro.build.user': 'guillaume', 'ro.product.locale.language': 'en', 'ro.product.device': 'GT-I9000', 'ro.adb.qemud': '1', 'persist.sys.recovery_update': 'false', 'ro.product.locale.region': 'US', 'ro.cm.device': 'galaxysmtd', 'ro.cm.display.version': '12.1-20151024-UNOFFICIAL-galaxysmtd', 'ro.ril.emc.mode': '2', 'dalvik.vm.heapgrowthlimit': '48m', 'dalvik.vm.checkjni': 'false', 'ro.build.description': 'GT-I9000-user 2.3.5 GINGERBREAD XXJVT release-keys', 'persist.sys.dun.override': '0', 'ro.config.notification_sound': 'Argon.ogg', 'ro.zygote.disable_gl_preload': 'true'}
default_system_dev_certificate = (str) build/target/product/security/testkey
device_type              = (str) MMC
extfs_sparse_flag        = (str) -s
extra_recovery_keys      = (str)  build/target/product/security/cm build/target/product/security/cm-devkey
fs_type                  = (str) ext4
fstab                    = (dict) {}
fstab_version            = (int) 2
mkbootimg_args            = (str)
mkyaffs2_extra_flags      = (str) -c 4096 -s 128
multistage_support        = (str) 1
recovery_api_version      = (int) 3
recovery_mount_options    = (str) ext4=max_batch_time=0,commit=1,data=ordered,barrier=1,errors=panic,nodelalloc
selinux_fc                = (str) /tmp/targetfiles-a5oeYc/BOOT/RAMDISK/file_contexts
system_size              = (int) 629145600
tool_extensions          = (str) device/samsung/aries-common
update_rename_support    = (str) 1
use_set_metadata          = (str) 1
userdata_size            = (int) 1379926016
(using device-specific extensions from target_files)
--- can't determine the cache partition size ---
loaded device-specific extensions from /tmp/targetfiles-a5oeYc/META/releasetools.py
using prebuilt recovery.img from IMAGES...
Traceback (most recent call last):
  File "./build/tools/releasetools/ota_from_target_files", line 1718, in <module>
    main(sys.argv[1:])
  File "./build/tools/releasetools/ota_from_target_files", line 1675, in main
    WriteFullOTAPackage(input_zip, output_zip)
  File "./build/tools/releasetools/ota_from_target_files", line 596, in WriteFullOTAPackage
    script.Unmount("/system")
  File "/home/xx/android/system/build/tools/releasetools/edify_generator.py", line 380, in Unmount
    self.mounts.remove(mount_point);
KeyError: '/system'
make: *** [/home/xx/android/system/out/target/product/galaxysmtd/cm_galaxysmtd-ota-9e04b1eeb2.zip] Erreur 1
make: quittant le rĂ©pertoire « /home/xx/android/system »

#### make failed to build some targets (05:26 (mm:ss)) ####





Wednesday, 21 October 2015

Compile AOSP for MT6580



I have stumbled upon this, but it seems like it contains the source code and instructions to compile for MT6580.

Any one with experience could you try to compile. If this is true the potential is great.

http://pan.baidu.com/wap/link?sharei...&uk=3562802345