1.å¦ä½å å
¥android o beta
2.miui10åºäºå®åå
3.androidç³»ç»ç¼è¯jarå
ç»app使ç¨
å¦ä½å å ¥android o beta
ä¸.认è¯androidçæ¶æ
Androidå ¶æ¬è´¨å°±æ¯å¨æ åçLinuxç³»ç»ä¸å¢å äºJavaèææºDalvikï¼å¹¶å¨Dalvikèææºä¸æ建äºä¸ä¸ªJAVAçapplication frameworkï¼ææçåºç¨ç¨åºé½æ¯åºäºJAVAçapplication frameworkä¹ä¸ã
androidå为å个å±ï¼ä»é«å±å°ä½å±åå«æ¯åºç¨ç¨åºå±ãåºç¨ç¨åºæ¡æ¶å±ãç³»ç»è¿è¡åºå±ålinuxæ ¸å¿å±ã
äº.æ建ç¯å¢
æ建å¼åç¯å¢
对å½å çå¼åè æ¥è¯´æçè¦çæ¯æ æ³å»è®¿é®androidå¼åç½ç«ã为äºæ´å¥½ç认è¯ä¸çï¼å¯¹ç¨åºåæ¥è¯´ï¼ä¼ç¿»å¢ä¹æ¯çä¸é¨ææ¯ï¼å¸¦ä½ å»é¢ç¥å¢å¤çä¸çï¼å¥½äºï¼ä¸åºè¯äº,源码网站源码下载小说 å½å å¼åè 访é®(androiddevtools) ä¸é¢å·²ç»æäºææä½ è¦çèµæºï¼åæ¶å¯ä»¥ä¸è½½å°æ们ç主è§framework
ä½æ¯è¿æ ·çæ建åªè½å»é 读æºä»£ç ï¼æ们æ æ³å»æ´è¿ä¸æ¥å»å®ç°èªå·±çrom,æ们çå°é¤åçç³»ç»å¨æ©æçå¼æ¾romæ¯èªå·±ä»æ°å®ç°äºframeworkç代ç ï¼ç°å¨çèµ·æ¥ä»æåäºï¼æ以æ们è¿è¦å»æ建androidç³»ç»çæºç ç¼è¯ç¯å¢ã
æ建æºç ç¼è¯ç¯å¢
ä¸.å¼å§ä¸»é¢
å¨ä¸å¼å§åcç¨åºçæ¶åé½æä¸ä¸ªè¿è¡çå ¥å£ï¼æ¯å¦
#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;
//è¿éçmainå°±æ¯åºç¨çå ¥å£
int main(int argc, const char * argv[]){
return 0;
}
å¨è®¡ç®æºç½ç»åçä¸æ们ç¨socketå®ç°ä¸ä¸ªæå¡å¨ç«¯ï¼ä¸æçæ¥å¬å®¢æ·ç«¯ç访é®ï¼èä¸ä»ç代ç æ¯è¿æ ·å®ç°çï¼
#include <winsock2.h>
#pragma comment(lib, "WS2_.lib")
#include <stdio.h>
void main()
{
WORD wVersionRequested;//çæ¬å·
WSADATA wsaData;
int err;
wVersionRequested = MAKEWORD(2, 2);//2.2çæ¬çå¥æ¥å
//å è½½å¥æ¥ååº,å¦æ失败è¿å
err = WSAStartup(wVersionRequested, &wsaData);
if (err != 0)
{
return;
}
//å¤æé«ä½åèæ¯ä¸æ¯2,å¦æä¸æ¯2.2ççæ¬åéåº
if (LOBYTE(wsaData.wVersion) != 2 ||
HIBYTE(wsaData.wVersion) != 2)
{
return;
}
//å建æµå¼å¥æ¥å,åºäºTCP(SOCK_STREAM)
SOCKET socSrv = socket(AF_INET, SOCK_STREAM, 0);
//Socketå°åç»æä½çå建
SOCKADDR_IN addrSrv;
addrSrv.sin_addr.S_un.S_addr = htonl(INADDR_ANY);//转æ¢Unsigned longå为ç½ç»åèåºæ ¼
addrSrv.sin_family = AF_INET;//æå®å°åç°
addrSrv.sin_port = htons();
//æå®ç«¯å£å·,é¤sin_familyåæ°å¤,å ¶å®åæ°é½æ¯ç½ç»åèåº,å æ¤éè¦è½¬æ¢
//å°å¥æ¥åç»å®å°ä¸ä¸ªç«¯å£å·åæ¬å°å°åä¸
bind(socSrv, (SOCKADDR*)&addrSrv, sizeof(SOCKADDR));//å¿ é¡»ç¨sizeofï¼strlenä¸è¡
listen(socSrv, 5);
SOCKADDR_IN addrClient;//åä¹ç¨æ¥æ¥æ¶å®¢æ·ç«¯Socketçç»æä½
int len = sizeof(SOCKADDR);//åå§ååæ°,è¿ä¸ªåæ°å¿ é¡»è¿è¡åå§åï¼sizeof
//循ç¯çå¾ æ¥å客æ·ç«¯åé请æ±
while (1)
{
//çå¾ å®¢æ·è¯·æ±å°æ¥ï¼å½è¯·æ±å°æ¥åï¼æ¥åè¿æ¥è¯·æ±ï¼
//è¿åä¸ä¸ªæ°ç对åºäºæ¤æ¬¡è¿æ¥çå¥æ¥åï¼acceptï¼ã
//æ¤æ¶ç¨åºå¨æ¤åçé»å¡
SOCKET sockConn = accept(socSrv, (SOCKADDR*)&addrClient, &len);
char sendBuf[];
sprintf(sendBuf, "Welcome %s to JoyChou",
inet_ntoa(addrClient.sin_addr));//æ ¼å¼åè¾åº
//ç¨è¿åçå¥æ¥åå客æ·ç«¯è¿è¡éä¿¡
send(sockConn, sendBuf, strlen(sendBuf)+1, 0);//å¤åéä¸ä¸ªåè
//æ¥æ¶æ°æ®
char recvBuf[];
recv(sockConn, recvBuf, , 0);
printf("%s\\n", recvBuf);
closesocket(sockConn);
}
}
ä»éç¨äºä¸ä¸ªwhileæ»å¾ªç¯å»çå¬å®¢æ·ç«¯ç请æ±ã
å ä¸æºä»£ç
public final class ActivityThread {
public static void main(String[] args) {
SamplingProfilerIntegration.start();
CloseGuard.setEnabled(false);
Environment.initForCurrentUser();
EventLogger.setReporter(new EventLoggingReporter());
Security.addProvider(new AndroidKeyStoreProvider());
final File configDir = Environment.getUserConfigDirectory(UserHandle.myUserId());
TrustedCertificateStore.setDefaultUserDirectory(configDir);
Process.setArgV0("<pre-initialized>");
Looper.prepareMainLooper();
//ä»ä¸å¯ä»¥çå°ä¸ºappå¼è¾äºä¸ä¸ªçº¿ç¨è¿å ¥äºlooperä¹ä¸
ActivityThread thread = new ActivityThread();
thread.attach(false);
if (sMainThreadHandler == null) {
sMainThreadHandler = thread.getHandler();
}
AsyncTask.init();
if (false) {
Looper.myLooper().setMessageLogging(new
LogPrinter(Log.DEBUG, "ActivityThread"));
}
Looper.loop();
throw new RuntimeException("Main thread loop unexpectedly exited");
}
}
çå°æºç 失æäºï¼æ²¡æä¸ä¸ªwhile循ç¯åï¼å ¶å®ç¨äºä»æ¹æ³å®ç°
//ç¨ä¸ä¸ªlooperçæºå¶å¾ªç¯çå¬ååº
Looper.prepareMainLooper();
Looper.loop();
è¿ä¸æ¥æ·±å ¥ä»£ç
public static void loop() {
final Looper me = myLooper();
if (me == null) {
throw new RuntimeException("No Looper; Looper.prepare() wasn't called on this thread.");
}
final MessageQueue queue = me.mQueue;
Binder.clearCallingIdentity();
final long ident = Binder.clearCallingIdentity();
// å¨è¿éçå°äºä¸ä¸ªå¾ªç¯çå¬æ¶æ¯
for (;;) {
Message msg = queue.next(); // might block
if (msg == null) {
// No message indicates that the message queue is quitting.
return;
}
Printer logging = me.mLogging;
if (logging != null) {
logging.println(">>>>> Dispatching to " + msg.target + " " +
msg.callback + ": " + msg.what);
}
msg.target.dispatchMessage(msg);
if (logging != null) {
logging.println("<<<<< Finished to " + msg.target + " " + msg.callback);
}
// Make sure that during the course of dispatching the
// identity of the thread wasn't corrupted.
final long newIdent = Binder.clearCallingIdentity();
if (ident != newIdent) {
Log.wtf(TAG, "Thread identity changed from 0x"
+ Long.toHexString(ident) + " to 0x"
+ Long.toHexString(newIdent) + " while dispatching to "
+ msg.target.getClass().getName() + " "
+ msg.callback + " what=" + msg.what);
}
msg.recycleUnchecked();
}
}
miuiåºäºå®åå
miuiæå¼å§åºäºAndroid8.0ï¼AndroidOï¼èå¼åçç³»ç»ï¼åç»æ´æ°miuiåæ¯åºäºAndroid9.0çæ¬å¼åçã
MIUIæ¯å¹´1ææ¥å°ç±³å¨å¹´å¹´åº¦æ»ç»å¤§ä¼å®£å¸å¯å¨çå ¨æ°å°ç±³ææºå®æ¹æä½ç³»ç»ãMIUIç³»ç»å ¨é¢åçº§å ¨é¢å±æå¿ï¼å»æåæçèææé®ï¼è®©åæ ·å°ºå¯¸çå±å¹è½å¤æ¿è½½æ´å¤ææå 容信æ¯ï¼AIè½åå å ¥è®©æ°ç³»ç»çä½éªåä¸ä¸ä¸ªå°é¶ãæ¤å¤ï¼MIUIè¿éç¨äºå ¨æ°çè§è§è®¾è®¡ãå¹´5ææ¥ï¼å°ç±³8æ·±å³åå¸ä¼ä¸ï¼MIUIæ£å¼åå¸ãå¹´6æ1æ¥ï¼å°ç±³å°æ£å¼å¼å¯MIUIä½éªçåå¼åçå æµã
androidç³»ç»ç¼è¯jarå ç»app使ç¨
æè¿å¨android Oç¼è¯ç³»ç»jarå ç»åºç¨ä½¿ç¨éå°äºç¹é®é¢ï¼ç½ä¸ä¹æ²¡ææ¾å°è§£å³æ¹æ¡ï¼è¿éè®°å½ä¸ã
ç¼è¯æ¹æ³åèç½ä¸å客就å¯ä»¥ï¼ androidæºç ç¼è¯jarå
æç»çæäºjavalib.jarï¼æ¹å为 tvManager.jarå³å¯ã注æï¼å¦æ没ææå®LACAL_JACK_ENABLEDé项ï¼åé»è®¤æ¯enabledï¼å°ä¼çæclasses.jackæ件ï¼ä¸ä¼äº§çclasses.jarå ï¼
æ£å¸¸æç §ä¸é¢æ¹æ¡å°±å¯ä»¥ç¼è¯åºjarå ï¼å¯¼å ¥å°ASéé¢å°±å¯ä»¥ä½¿ç¨ï¼ä¸é¢è¯´ä¸æéå°çé®é¢
éå°classes.jar.toc被ä¾èµï¼ ä½æ¯æä¹ç¼è¯é½æ²¡æç¼è¯åºæ¥ï¼ç½ä¸ä¹æ²¡ææ¾å°å¯¹åºçæ¹æ³ï¼ç¼è¯é误å¦ä¸:
blogs.com/wangqiang9/p/.html
/questions//how-to-generate-classes-dex-toc-files