Position: Home page » Ethereum » Android docking with Ethereum

Android docking with Ethereum

Publish: 2021-05-12 01:51:33
1.

blockchain includes public blockchain, joint (instry) blockchain and private blockchain. Public chain point-to-point e-cash system: bitcoin, smart contract and decentralized application platform: Ethereum

blockchain is a new application mode of distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and other computer technologies

blockchain is an important concept of bitcoin. In essence, it is a decentralized database. At the same time, as the underlying technology of bitcoin, it is a series of data blocks generated by using cryptographic methods. Each data block contains a batch of bitcoin network transaction information, Used to verify the validity of its information (anti-counterfeiting) and generate the next block



extended data

according to the different degree of blockchain network centralization, three kinds of blockchains under different application scenarios are differentiated:

1. The blockchain with the whole network open and without user authorization mechanism is called public chain

2. The authorized nodes are allowed to join the network, and the information can be viewed according to the authority. It is often used in the inter agency blockchain, which is called alliance chain or instry chain

3. All the nodes in the network are in the hands of one organization, which is called private chain

alliance chain and private chain are also called licensing chain, and public chain is called non licensing chain

blockchain features

1, decentralization. Blockchain technology does not rely on additional third-party management institutions or hardware facilities, and there is no central control. In addition to the self-contained blockchain itself, each node realizes information self verification, transmission and management through distributed accounting and storage. Decentralization is the most prominent and essential feature of blockchain

2. Openness. Blockchain technology is based on open source. In addition to the private information of all parties involved in the transaction is encrypted, the data of blockchain is open to everyone. Anyone can query blockchain data and develop related applications through the open interface, so the information of the whole system is highly transparent

3. Independence. Based on consensus specifications and Protocols (similar to various mathematical algorithms such as hash algorithm used by bitcoin), the whole blockchain system does not rely on other third parties, and all nodes can automatically and safely verify and exchange data in the system without any human intervention

4. Safety. As long as 51% of all data nodes cannot be controlled, the network data cannot be arbitrarily manipulated and modified, which makes the blockchain itself relatively safe and avoids subjective and artificial data changes

5. Anonymity. Unless there are legal requirements, technically speaking, the identity information of each block node does not need to be disclosed or verified, and the information can be transferred anonymously

2. Ethereum also uses blockchain technology, but it is more convenient to use than bitcoin's blockchain Turing, which is complete and open source. Anyone can create their own application on the basis of Ethereum
3.

This is two different concepts. According to different standards, blockchain can be classified into three categories:

& # 8195&# 8195; 1) According to the network scope of blockchain, it can be divided into public chain, private chain and alliance chain

 &# 8195; 2) According to the docking type of blockchain, it is divided into single chain, side chain and interconnection chain

 &# 8195; 3) According to the display environment of blockchain deployment, it can be divided into main chain and test chain

the main chain can be understood as a formal online and independent blockchain network, while the public chain refers to a blockchain that can be read by anyone, can send transactions and can be effectively confirmed by anyone, and can participate in its consensus process

4. No, blockchain is a decentralized distributed ledger. You can understand blockchain as Internet. Will Internet cheat people? No, but some people will use the Internet to cheat others, and blockchain is the same
blockchain is not only about issuing money, but also can be applied in many places. The biggest feature of blockchain is decentralization. General Internet procts are centralized, and blockchain can use decentralization to solve the trust problem between each node. Because in the blockchain, information is traceable and cannot be tampered with
now there are many blockchain landing projects. You can properly understand that it is not a simple coin issuing thing, nor a deceptive project.
5. Bitcoin cash, also known as BCC / BCH
it is a new encrypted digital asset launched by viabtc based on bitcoin ABC scheme, which can be regarded as a bifurcated or competitive currency of bitcoin BTC
generally, as the main virtual currency, bitcoin's rising value will drive the price of other corresponding currencies to rise. Of course, as an investment proct similar to stocks, there are certain risks.
6. Eth0, eth1, eth2... Represent NIC 1, NIC 2, NIC 3...
Lo represents 127.0.0.1, that is, localhost
WLAN 0 represents wireless NIC

after executing the ifconfig command, the system will set the necessary parameters in the kernel table, so that Linux knows how to communicate with NIC on the network. The ifconfig command has the following two formats:

* ifconfig [interface]

* ifconfig interface [aftype] option | address...

the first format of ifconfig (or use the ifconfig command without any parameters) can be used to view the network configuration of the current system

just after the system is installed, Linux is actually used without network card or network connection, but the loopback mode can be used through ifconfig to make the computer think that it is working on the network

now let's run the ifconfig command. The ifconfig command without parameters can display the currently started network interface, The output results are as follows:

[ root@machine1 /sbin]#ifconfig

eth0 Link encap:Ethernet HWaddr 52:54:AB:DD:6F:61

inet addr:210.34.6.89 Bcast :210.34.6.127 M ask:255.255.255.128

UP BROADCAST RUNNING MULTICAST MTU:1500 M etric:1

RX packets:46299 errors :0 dropped:0 overruns :0 frame:189

TX packets:3 057 errors:0 dropped :0 overruns:0 carrier :0

c ollisions:0 txqueuelen :100

I nterrupt:5 Base address:0xece0

lo Link encap:Local Loopback

inet addr:127.0.0.1 Mask :255.0.0.0

UP LOOPBACK RUNNING MTU:3924 M etric:1

RX packets:44 errors :0 dropped:0 overruns :0 frame:0

TX packets:44 errors:0 dropped :0 overruns:0 carrier :0

c ollisions:0 txqueuelen : 0

the configuration parameters of the Ethernet card of the machine are headed by eth0. The setting here shows the device name / dev / eth0 of the Ethernet card and the MAC address of the hardware 52:54: ab: DD: 6F: 61. The MAC address is determined by the manufacturer and the unique address of each network card<

however, we can manually change the MAC address of the NIC, as long as we add:

ifconfig eth0 HW ether XX: XX: XX: XX: XX: XX

jiania comments:

eth0, eth1, eth2 to the network in / etc / rc.d/init.d /, representing NIC card 1, NIC card 2, Network card 3

HW means hardware

ether means Ethernet Ethernet

then restart. At this time, check with ifconfig command, and we will find that the MAC address of network card has changed to XX: XX: XX: XX: XX: XX: XX

ifconfig configures the network card

configures the IP address of the network card

ifconfig eth0 192.168.0.1 netmask 255.255.0

configures the IP address and 24 bit mask of 192.168.0.1 on eth0. What if you want to configure an IP address of 192.168.1.1/24 on eth0? Use the following command

ifconfig eth0:0 192.168.1.1 netmask 255.255.255.0

then use the ifconifg command to view the information of the two network cards, which are eth0 and eth0:0. If you want to add more IP, the name of the network card is eth0:1, eth0:2... Fill in a few if you want. ok

configure the hardware address of the network card

ifconfig eth0 HW ether XX: XX: XX: XX: XX: XX changes the hardware address of the network card. At this time, you can cheat the IP address of the LAN

disable the network card

ifconfig eth0 down

enable the network card

ifconfig eth0 up

the function of ifconfig command is very powerful, you can also set the MTU and hybrid mode of the network card.
7. device eth0 entered promiscuous mode
Apr 11 16:30:21 localhost kernel: device eth0 left promiscuous mode
Apr 11 16:30:39 localhost kernel: device eth0 entered promiscuous mode
Apr 11 16:30:39 localhost kernel: device eth0 left promiscuous mode
Apr 12 15:11:46 localhost kernel: device eth0 entered promiscuous mode
Apr 12 15:11:46 localhost kernel: device eth0 left promiscuous mode
Apr 13 11:30:58 localhost kernel: device eth0 entered promiscuous mode
Apr 13 11:30:58 localhost kernel: device eth0 left promiscuous mode
log文件实打印状态信息两种

实打印主要:logcat mainlogcat radiologcat eventstcpmp QXDM Log

状态信息:adb shell dmesgadb shell mpstateadb shell mpsysadb bugreport

实log:

adb logcat -b events -v time 打印系统事件志比触屏事件

tcpmp 用于TCP/IP协议相关都使用抓

adb shell tcpmp -s 10000 -w /sdcard/capture.pcap

比抓mms载候UA profilebrowser网候使用proxyAPN载streaming相关内容包括UA profile等

状态log:

其实够bugreport命令adb bugreport>bugreport.log)

面包含dmesgmpstatempsys

dmesg命令adb shell dmesg > ldmesg_kernel.logkernellog凡跟kernel相关比driver问题相机蓝牙usb启等等

mpstate系统状态信息面比较全包括手机前内存信息、cpu信息、logcat缓存kernel缓存等等

mpsys关于系统所进程Process内容都面adb shell mpsys 命令更详尽用

比adb shell mpsys meminfo system查看systemprocess内存信息

mpsys [options]

meminfo 显示内存信息

cpuinfo 显示CPU信息

account 显示accounts信息

activity 显示所activities信息

window 显示键盘窗口关系

wifi 显示wifi信息

通adb logcat/bugreport实查看系统log及系统状态信息

何Log存储保存系统运行情况呢

通些脚本或者执行执行程序保存log信息便析问题

2 抓取实log

? int main(int argc, char *argv[]) { …… //抓取main log char path[] = "/xxx/xxx/app_main.log"; sprintf(cmd,"logcat -v time > %s",path); fd = open(path, O_WRONLY|O_TRUNC|O_CREAT, 0777); <STRONG>system</STRONG>(cmd); //radio log …… sprintf(cmd,"logcat -b radio -v time > %s",path); <STRONG>system</STRONG>(cmd); //kernel …… sprintf(cmd,"cat /proc/kmsg > %s",path); <STRONG>system</STRONG>(cmd); //bluetoolth log sprintf(cmd,"hcimp -w %s","/data/bt.log"); <STRONG>system</STRONG>(cmd); …… }3 抓取状态log

? int main(int argc, char *argv[]) { //panic log 需要判断/proc/apanic_console否存 sprintf(cmd,"cp -R %s %s",from_dir,to_dir); <STRONG>system</STRONG>(cmd); //anr log /data/anr/ sprintf(cmd,"cp -R %s %s",from_dir,to_dir); <STRONG>system</STRONG>(cmd); //tombstones log /data/tombstones/ <STRONG>modem重启复位等</STRONG> sprintf(cmd,"cp -R %s %s",from_dir,to_dir); <STRONG>system</STRONG>(cmd); //mdm log /data/tombstones/mdm/<STRONG>modem重启复位</STRONG> sprintf(cmd,"cp -R %s %s",from_dir,to_dir); <STRONG>system</STRONG>(cmd); …… }


panic log:

表示Linux kernel走知道该走步状况tombstone log:

系统发tombstone候kernel首先报严重警告信号signal,层接收

进程调试工具进程调用栈现场保存起并系统创建data/tombstones目录异进程信息写目录面

发者需要通调用栈析整调用流程找问题点4 Runtime 执行程序
编译执行程序实际使用需要些控制参数

代码何执行些执行程序:

底层通system();

Java层Runtime.getRuntime().exec();

例:

String BIN_PATH = "/system/bin/catch_log";

Runtime.getRuntime().exec(BIN_PATH + " -x 1");

Runtime.getRuntime().exec("/system/bin/cat "+path);

Runtime.getRuntime().exec("su -c chmod 777 /data/glad.txt");

Runtime.getRuntime().exec("/system/bin/sh /data/test.sh");

Android Runtime使直接调用底层Linux执行程序或脚本能

比Linux写测试工具直接编译apk通Runtime调用

或者写脚本apk直接调用省间层或者JNI

参考文档:

5 diag_mdlog
高通提供抓取qxdm log东东

既包括AP端包括BP端或者跟选择端口关系,8064apmodem端口独立

代码位置:\vendor\qcom\proprietary\diag\mdlog\

使用diag_mdlog执行程序抓取log

需要Diag.cfg文件配置滤项选择需要Log信息使用前必须放置Diag.cfg文件

Diag.cfg文件用QXDM通F12Filtered View /Config Diag.cfg

程序能执行用kill -9 PID 其强制结束

6 抓取Ap 端 memory mp
高通qpst工具Memory Dump App

要downloader模式

需要修改nv项:

905 0

4399 1

或者使用emmc进入downloader模式

打连接手机 Get Regions选择需要保存ReginSaveTo选择文件夹确定即

注意:路径能文必须英文路径
8. Since the government intervened in the foreign exchange market to prevent the further devaluation of the RMB and the people's Bank of China (PBOC) guided the devaluation of the RMB on August 11 and launched a "market-oriented" exchange rate formation mechanism, the bank has had to invest up to US $200 billion in national foreign exchange reserves to prevent the decline of the people's currency from exceeding its expected range. In order to promote the internationalization of RMB and stabilize the credit system of RMB. It can be seen that foreign capital is flowing out of China, the stock market withdraws, the impact of RMB, the appreciation of the US dollar, and various crises are emerging. But at present, China has huge foreign exchange reserves and the international situation is constantly changing. China, Russia and Asia have the ability to resolve this crisis.
9. New admission platform to see if there are any account opening activities and so on.
Hot content
Inn digger Publish: 2021-05-29 20:04:36 Views: 341
Purchase of virtual currency in trust contract dispute Publish: 2021-05-29 20:04:33 Views: 942
Blockchain trust machine Publish: 2021-05-29 20:04:26 Views: 720
Brief introduction of ant mine Publish: 2021-05-29 20:04:25 Views: 848
Will digital currency open in November Publish: 2021-05-29 19:56:16 Views: 861
Global digital currency asset exchange Publish: 2021-05-29 19:54:29 Views: 603
Mining chip machine S11 Publish: 2021-05-29 19:54:26 Views: 945
Ethereum algorithm Sha3 Publish: 2021-05-29 19:52:40 Views: 643
Talking about blockchain is not reliable Publish: 2021-05-29 19:52:26 Views: 754
Mining machine node query Publish: 2021-05-29 19:36:37 Views: 750